Skip to content

Instantly share code, notes, and snippets.

View tim-phillips's full-sized avatar

Tim Phillips tim-phillips

  • Los Angeles
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 17, 2024 11:31
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@guyellis
guyellis / parseEmailsFromString.js
Created May 1, 2014 16:34
Allows a list of space,comma,semicolon,tab and newline delimited emails to be parsed into an array.
// Accepts a single paramater which is one or more emails separated
// by space,comma,semicolon,tab, or newline.
// Returns an array of tokens that should be emails
// Does not validate emails to see if they are well formed.
exports.parseEmails = function(emails) {
return emails.toLowerCase().split(/[\s,;\t\n]+/);
};
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a