Skip to content

Instantly share code, notes, and snippets.

View pablo-jurado's full-sized avatar

Pablo Jurado pablo-jurado

View GitHub Profile
@pablo-jurado
pablo-jurado / keybindings.json
Last active October 6, 2022 10:14
vscode custom shortcuts
[
{
"key": "cmd+l",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "shift+cmd+l",
"command": "cursorRightSelect",
"when": "textInputFocus"
@pablo-jurado
pablo-jurado / express_postgress_knex.md
Created June 12, 2020 20:36 — forked from laurenfazah/express_postgress_knex.md
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
@pablo-jurado
pablo-jurado / postgres-cheatsheet.md
Created September 24, 2019 17:17 — forked from Kartones/postgres-cheatsheet.md
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)
@pablo-jurado
pablo-jurado / curl.md
Created September 21, 2019 15:49 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

{
"extends": [
"standard",
"plugin:react/recommended",
"prettier",
"prettier/react",
"prettier/standard"
],
"plugins": ["react", "prettier", "standard"],
"parserOptions": {
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "