Skip to content

Instantly share code, notes, and snippets.

Useful Postgres (psql) commands

Essential psql Commands.

Create new DB and new user for that DB

Create the new database my_db:

CREATE DATABASE my_db;
@basperheim
basperheim / download-youtube-dl-crop-ffmpeg.md
Last active March 6, 2023 07:35
Download and crop YouTube videos using youtube-dl and FFmpeg

Download a YouTube video with youtube-dl

Basic youtube-dl command is: youtube-dl "https://www.youtube.com/watch?v=VIDEO_ID_HERE".

Make sure to do the following first:

  • Ensure the python3 command is working and actually runs a version of Python 3.x.
  • Make sure that the path to your cookies file is correct.
  • Make sure that you have the latest version of youtube-dl installed (youtube-dl --version).
  • Ensure the absolute file path for the youtube-dl binary or installation (In a UNIX-like terminal use which youtube-dl).
@bubblerun
bubblerun / array.js
Created January 17, 2017 02:37
State abbreviations JavaScript array
[ 'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY' ];
@chranderson
chranderson / nvmCommands.js
Last active July 26, 2024 20:22
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node