To avoid callback hell , a very useful tool for structuring calls in a sequence and make sure the steps pass the data to the next step. nJoy 😉
Category: Uncategorized
Node.js Start script or run command and handoff to OS (no waiting)
Sometimes you want to run something in the OS from your node code but you do not want to follow it or have a callback posted on your stack. The default for child_process spawning is to hold on to a handle and park a callback on the stack. however there is an option which is…
Identify OS on remote host
For nmap to even make a guess, nmap needs to find at least 1 open and 1 closed port on a remote host. Using the previous scan results, let us find out more about the host 192.168.0.115: # nmap -O -sV 192.168.0.115 Output: Starting Nmap 7.80 ( https://nmap.org ) at 2020-10-02 12:21 CEST Nmap scan…
How to quit ESXi SSH and leave background tasks running
In Linux when a console session is closed most background jobs (^Z and bg %n) will stop running when the parent ( the ssh session ) is closed because the parent sends a SIGHUP to all its children when closing (properly). Some programs can catch and ignore the SIGHUP or not handle it at all…
Upgrading Certbot Lets Encrypt on Ubuntu
😉 nJoy
Convert Large numbers to binary in Excel
=DEC2BIN(MOD(QUOTIENT($A$1,16^7),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^6),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^5),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^4),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^3),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^2),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^1),16),4)&” “&DEC2BIN(MOD(QUOTIENT($A$1,16^0),16),4) The above code will convert large numbers up to 32 bit. nJoy 😉
SYSTEMD – controls
Starting with Ubuntu 15.04, Upstart will be deprecated in favor of Systemd. With Systemd to manage the services we can do the following: systemctl start SERVICE – Use it to start a service. Does not persist after reboot systemctl stop SERVICE – Use it to stop a service. Does not persist after reboot systemctl restart…
Fixing keyboard in ubuntu
sudo dpkg-reconfigure keyboard-configuration nJoy 😉
Using ngrok with React based websites
The problem : When we have a react.js based site (hosted on port 8000) and ngrok it for development purposes we get Invalid Host Header The fix is to override the header on reflection: ngrok http 8000 -host-header=”localhost:8000″ That’s it 😉 nJoy
Clear Linux Cache
1. Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches 2. Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches 3. Clear PageCache, dentries and inodes. # sync; echo 3 > /proc/sys/vm/drop_caches nJoy 😉