- display (list) all open TCP+UDP ports and grep for listening ones
sudo lsof -i -P | grep LISTEN
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME launchd 1 root 11u IPv6 0x26dd73cb700390df 0t0 TCP *:22 (LISTEN) ....
This step by step tutorial will show you how to set up a Node.js server with MongoDB to DigitalOcean using PM2, NGINX as reverse proxy and a SSL from LetsEncrypt. We will also add a custom domain name.
- Download PuTTY & PuTTYgen
- Download WinSCP
- Have your application on a GitHub repo.
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
// NOTE: time string must look like this 07:05:45PM or this 07:05:45AM and account for 12:00:00AM and convert 12:00:00pm to 12:00:00 | |
function timeConversion(s) { | |
const ampm = s.slice(-2); | |
const hours = Number(s.slice(0, 2)); | |
let time = s.slice(0, -2); | |
if (ampm === 'AM') { | |
if (hours === 12) { // 12am edge-case | |
return time.replace(s.slice(0, 2), '00'); | |
} | |
return time; |
I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.
Here is what I had messed up, which you also probably did:
- I had too many different python interpreters
- Too many different symlinks which I lost track of
- almost no package I installed with pip worked without a headache
- any attempt to fix using online resources made it worse.
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
This is an incomplete list of resources including courses and individuals who publish content that has helped me grow as a web developer and designer. Many of these resources are WordPress-specific as that is my current area of specialization. This list will grow over time. If you've got something to add, send me a link @kevinwhoffman and I'll check it out!