Skip to content

Instantly share code, notes, and snippets.

@ernesthan
ernesthan / zsh-keyboard-shortcuts.md
Created September 20, 2023 02:42 — forked from mkfares/zsh-keyboard-shortucts.md
Common zsh Keyboard Shortcuts on macOS Catalina

Common zsh Keyboard Shortcuts on macOS

Navigation

CTRL + A : Move the cursor to the beginning of the line
CTRL + E : Move the cursor to the end of the line
OPTION + Left Arrow : Move the cursor one word backward
OPTION + Right arrow : Move the cursor one word forward
Left Arrow : Move the cursor one character backward
Right Arrow : Move the cursor one character forward

@ernesthan
ernesthan / api_utils.py
Created July 12, 2023 14:35 — forked from Causb1A/api_utils.py
escape hatch
# Base Library Packages
import _thread
# Third Party Packages
from pynput import keyboard
from functools import wraps
import sys
def escape_hatch(
@ernesthan
ernesthan / postgres-cheatsheet.md
Created December 17, 2020 07:49 — 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)
@ernesthan
ernesthan / postgres-brew.md
Created September 10, 2020 05:35 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update