Skip to content

Instantly share code, notes, and snippets.

@kanghyojun
kanghyojun / README.md
Created July 30, 2018 14:02 — forked from dahlia/README.md
니름 스프린트 사전 준비
@kanghyojun
kanghyojun / query_debug.py
Created November 24, 2017 11:38 — forked from dahlia/query_debug.py
Print SQLAlchemy queries (including bind params).
"""Print SQLAlchemy queries (including bind params)."""
def show_query(query):
from sqlalchemy.dialects.postgresql import dialect
qc = query.statement.compile(dialect=dialect())
return str(query) % {n: repr(b.value) for n, b in qc.binds.items()}
def print_query(query):
@kanghyojun
kanghyojun / postgres-cheatsheet.md
Created November 17, 2016 01:24 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

@kanghyojun
kanghyojun / material-theme.itermcolors
Created October 24, 2016 00:02 — forked from xinan/material-theme.itermcolors
Material Theme iTerm2 Port
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.25882352941176467</real>
<key>Green Component</key>
<real>0.21176470588235294</real>
@kanghyojun
kanghyojun / material-theme.terminal
Created October 22, 2016 09:05 — forked from mvaneijgen/material-theme.terminal
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2