Skip to content

Instantly share code, notes, and snippets.

View chiangbing's full-sized avatar

Bing Chiang chiangbing

View GitHub Profile
@chiangbing
chiangbing / mysql_load.sh
Created January 8, 2014 02:50
generate insert command to load data file to mysql
escape_quote() {
echo $1 | sed "s/'/''/g"
}
# Get commands to insert data to MySQL.
#
# Params:
# $1 -- table to insert data to
# $2 -- number of fields
# $3 -- data file (fields delimited by '\1', also note that '\1' after last
@chiangbing
chiangbing / postgres_admin_cheatsheet.markdown
Last active March 9, 2016 09:39
Postgres Admin Cheatsheet
:root {
--c-apricot: #E2B49A;
--c-aquapoise: #7BD4CC;
--c-army: #7B895B;
--c-blackcherry: #39324B;
--c-blacksand: #3F3931;
--c-blush: #EABCAC;
--c-bondiblue: #2A93D5;
--c-borabora: #8BCBC8;
--c-botanica: #3F4234;