Ensure you have
PSQL
installed
Connecting to your DB
psql --host=localhost --port=5432 --username=developer --dbname=dummyDb --password
Once connected,
To show list of PID on a port:
lsof -t -i :YOUR_PORT_NUMBER
top
command will show a list of all running processes and various statistics about each process. It’s usually most helpful to sort by processor usage or memory usage, and to do that you’ll want to use the -o flag
top -o cpu | grep :YOUR_PORT_NUMBER
shows details of the respective pidTo kill a process by PID:
kill :YOUR_PORT_NUMBER
Sources
console.log(module.exports); //-> {}
exports.apple = 'apple';
console.log(module.exports); //-> { apple: 'apple'}
module.exports['pear'] = 'pear';
console.log(module.exports); //-> { apple: 'apple', pear: 'pear'}
module.exports = 'uhoh';
console.log(module.exports); //-> uhoh
This is just learning journal for myself and I welcome any help from the public to improve my understanding.
Whether a globally or locally installed module, eventually it will reside within a node_modules
directory. The contents of this gist is scopped within the local node_modules
of an application's directory. Now within the local node_modules
there should always exist a .bin
folder that houses all the excutable files.
What I've gathered thus far:
chmod
755 or 777 permissions to run as scripts.#!/usr/bin/env node
on the very first line.Syntax: YYYY-MM-DDTHH:MM:SSZ+HH:MM eg:2018-10-19T03:00:00.000Z
This consists 4 parts:
YYYY-MM-DD
: Standard Gregorian calendar dateT
: Date-time delimiter, it seperates the date from the timeHH:MM:SS:SSS
: Standard time representation in 24hr format. Seconds SS
and milliseconds SSS
may be ommited for brevityHere're my learnings from Redux Docs on Middlewares. If you haven't read through the docs yet, please do so first.
Middlewares work with the beauty of Currying.
The concept of using a Higher Order Function to generate a new function with the partial application or all of its arguments.
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config
file in a .ssh
directory. The config
file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh
directory by default. You can navigate to it by running cd ~/.ssh
within your terminal, open the config
file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes