Skip to content

Instantly share code, notes, and snippets.

View nfabredev's full-sized avatar
💭
💻 🗺

nfabredev nfabredev

💭
💻 🗺
View GitHub Profile
@nfabredev
nfabredev / postgres-cheatsheet.md
Created November 15, 2017 14:15 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -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)
@nfabredev
nfabredev / Git branch bash autocomplete *with aliases*
Created December 15, 2017 10:49 — forked from JuggoPop/Git branch bash autocomplete *with aliases*
Git branch bash autocomplete *with aliases* (add to .bash_profile)
# To Setup:
# 1) Save the .git-completion.bash file found here:
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect:
# Git branch bash completion
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
# Add git completion to aliases
@nfabredev
nfabredev / launch.json
Created February 14, 2019 14:25 — forked from nicolasrouanne/VSCODE_LAUNCH.md
VS Code configuration for Ruby
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Local File",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/main.rb"
},