Blogs

Using manager to install node version | ReactJS

There is a good manager that will help you with all node versions. It's called nvm(Node version manager).

https://github.com/creationix/nvm

All install guides are on git page. I install it like this.

curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh

bash install_nvm.sh

Check to see if everything installed correctly

nvm --version

Telephony sendsms not working + Unhandled Exception: PlatformException(failed_to_fetch_sms, Flutter Telephony: Error getting SmsManager, null, null) | Flutter

Fix using

installed telephony version 0.1.1
flutter version 2.10.3

Dual wan + Fail over - mikrotik

# may/24/2022 14:35:48 by RouterOS 6.40.4
# software id = W8V4-SIVP
#
# model = RouterBOARD 931-2nD
# serial number = 7CBD08915F53
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
/interface ethernet
set [ find default-name=ether1 ] name=1-Globe
set [ find default-name=ether2 ] name=2-Smart
set [ find default-name=ether3 ] name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=10.0.0.2-10.0.0.254

Pag hindi ka maka connect sa pisowifi ngrok admin | PISOWIFI

Pag hindi ka maka connect sa ngrok admin.

This site can’t be reached xxxx-xxx-176-64-191.ngrok.io’s DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE

dns ip address
Ibig sabihin nito kailangan niyo palitan ung DNS sa ip settings sa computer/phone mo. Iset niyo lang ang DNS

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set | flutter

Uploading flutter android sdk 31 version makes an error on google play store.

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

android app bundle error

error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree | flutter

memory leak error/warning

This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().

Just add this line of code before calling the setstate.

if (!mounted) {
  return;
}
// your setState here

Paano maka access ng pisowifi online | pisowifi | wifi ng bayan

Steps pano maka access online sa wifi ng bayan vendo:
1. Register ka muna sa ngrok website(https://dashboard.ngrok.com/signup) pra maka kuha ng authentication token
ngrok registration page

2. Once maka login kana sa ngrok, copy niyo ung authentication token sa ngrok account.

Pisowifi ssid palagi nalang naka connecting | PISOWIFI | How to solve

Pag ung pisowifi pag connect mo is naka connecting lang lagi, obtaining IP ADDRESS pag check mo sa settings ng phone mo. Possible problema:
1. Check natin ung USB TO LAN baka nasira or nag malfunction na. Palitan lang natin ng bago and make sure ung bago is tested na working.
usb to lan
2. Pag hindi padin nag work, icheck natin ung utp cable from USB TO LAN (gamitin muna nating ung bago hindi ung luma para maka sigurado tayo na working ung USB TO LAN).

CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate using an letsencrypt-signed webserver | flutter

I have spent so many hours just to figure this out. I use wss(secure) for my django websocket. Ive realized that using firebase and firecamp is working perfectly, but in my flutter app websocket connect it does not work. arggg, spending many hours working this error (I initially dont know why the heck is this).

Adding this piece of code in the main.dart file fix my issue. :)

Using Token as authentication for websocket | django == 4.0.3 | channels == 3.0.4

Using Token as authentication for websocket

Version:

        django == 4.0.3
        channels == 3.0.4
    

Important notice: must declare first before, AuthMiddlewareStack.

import os
import django

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')

django.setup()

from channels.auth import AuthMiddlewareStack
    

1.Add middleware.py in your django app.

How I create multiple django site for subdomain1 and subdomain2, using gunicorn + nginx + systemd | ubuntu 20.04 | DigitalOcean

Prerequisite:

1.Can run gunicorn on your env

gunicorn --bind 0.0.0.0:9001 myapp.wsgi
2.Added subdomain on droplet networking. 3.Root access. 4.Install certbot nginx
sudo apt install certbot python3-certbot-nginx
.

Create multiple django site for subdomain1 and subdomain2, using gunicorn + nginx + systemd | DigitalOcean.

1.Make sure you already installed the gunicorn on your django env

pip install gunicorn

2.Create new socket file on

sudo nano /etc/systemd/system/gunicorn_subdomain1.socket

How to fix allan single coinslot sensor malfunction

If you experience na ung allan coinslot niyo is hindi mag accept ng coins or nag mamalfunction.
TRY THIS FIX, Lagyan niyo lng ng black ink/paint ung sa may sensor para mag block sa mga noise light surrounding. Ung black ink/paint gamit niya pra mag focus lng sa light nong LED ng sensor.

HOPE THIS WILL HELP YOU :)

Ubuntu 18.04lts slow boot time even using SSD

My problem was the network was running so slow to detect.

This is my pc specs:
pc specs

I reduce the time for this to process to save time at boot.
I edited networking.services

sudo nano /etc/systemd/system/network-online.target.wants/networking.service

Change

TimeoutStartSec=5min

To

TimeoutStartSec=2s

Then reboot.

Why RC snubber is very important?

If you have created your own circuit which run from a microcontroller. You want to control your appliances, motor or any AC load. You probably notice some issue regarding a relay when you control the AC load.

When there is no load in the relay, the circuit runs fine. Now what if we put some load in the relay like a motor. You might notice that the circuit has some issue like it will reset itself or some abnormalities from the circuit.

This where the RC snubber is very important, you just put a RC snubber to the output of the relay. Just what I did in my circuit.