Sublime Text shortcut on command line (subl)

TLDR: Create a ~/bin directory and symlink the Sublime command: mkdir ~/bin ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl Note: if ~/bin is not in your $PATH, add it to your zshrc or bash_profile: echo ‘# add ~/bin to path for scripts like subl\nPATH=$PATH:~/bin’ >> ~/.zshrc && source ~/.zshrc The Sublime Text documentation “OS X Command Line”…

How to publish an npm module

Step 0: You need some code to share. Create a new Github repo or choose one you currently want to publish Here is the command line argument to create a repo called “adder” $ curl -u <your_username> https://api.github.com/user/repos -d “{\”name\”: \”adder\”}” Once you have chosen a Github repo clone it Step 1: Create a proper…

Node Sequelize Postgres Tutorial

Why use Sequelize? Sometimes you want your team to use an ORM. Often you need to run migrations. Sequelize provides ORM features and a much needed migrations library that allows us to create producible and version controlled database schemas. Setup your project Step 1: Create an npm project in your desired directory $ npm init…

Postgres timestamp with timezone – “timestamptz”

Postgres can store your “timestamp with timezone” or “timestamp without timezone”.If you don’t specify either, it will default to “timestamp without timezone” Which one should you use? TLDR: “timestamps with time zones” Whats the problem living life without timezones? Say you have two users in two different timezones – one in California and one in…