## Install Github CLI
brew install gh
## Login Github
gh auth login
## Checkout Github PR
gh pr checkout 126 # pr no.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DotMap(dict): | |
"""Dot.Notation access to dictionary attributes""" | |
__getattr__ = dict.get | |
__setattr__ = dict.__setitem__ | |
__delattr__ = dict.__delitem__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Table(Base): | |
id = Column(Integer, primary_key=True) | |
_name = Column('name', String(24)) | |
@property | |
def name(self): | |
return self._name; | |
@name.setter | |
def name(self, value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all tables: | |
select db_id, id, name, sum(rows) as mysum | |
from stv_tbl_perm where db_id = 100546 | |
group by db_id, id, name order by mysum desc; | |
# list all running processes: | |
select pid, query from stv_recents where status = 'Running'; | |
# describe table | |
select * from PG_TABLE_DEF where tablename='audit_trail'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
GOPATH="/tmp/go" | |
APP_BUILD_DIR="$GOPATH/src/project" # We will build the app here | |
APP_STAGING_DIR=$(pwd) # Current directory | |
DEP_VERSION="v0.5.0" # Use specific version for stability | |
# Install dep, a Go dependency management tool, if not already installed or if | |
# the version does not match. | |
if ! hash dep 2> /dev/null || [[ $(dep version | awk 'NR==2{print $3}') != "$DEP_VERSION" ]]; then | |
curl -L -s https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 -o /usr/local/bin/dep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible "오리지날 VI와 호환하지 않음 | |
set cindent "C 프로그래밍용 자동 들여쓰기 | |
set smartindent "스마트한 들여쓰기 | |
set lbr | |
set wrap | |
set number "행번호 표시, set nu 도 가능 | |
set nowrapscan "검색할 때 문서의 끝에서 처음으로 안돌아감 | |
set nobackup "백업 파일을 안만듬 | |
set visualbell "키를 잘못눌렀을 때 화면 프레시 | |
set ruler "화면 우측 하단에 현재 커서의 위치(줄,칸) 표시 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# pyenv install for CentOS 6.5 x86_64 | |
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel | |
git clone git://github.com/yyuu/pyenv.git ~/.pyenv | |
export PATH="$HOME/.pyenv/bin:$PATH" | |
eval "$(pyenv init -)" |