Skip to content

Instantly share code, notes, and snippets.

View myungseokang's full-sized avatar
๐Ÿ€
Good Luck

๊ฐ•๋ช…์„œ (Myungseo Kang) myungseokang

๐Ÿ€
Good Luck
View GitHub Profile
@myungseokang
myungseokang / django-test-easy-and-fast.md
Created December 16, 2016 07:57 — forked from perhapsspy/django-test-easy-and-fast.md
Django์—์„œ Test ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ํ•˜๊ธฐ

Django์—์„œ Test ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ํ•˜๊ธฐ

django ๊ธฐ๋ณธ ํ…Œ์ŠคํŠธ๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๋•์— ๋А๋ฆฌ๊ณ  ๋ฒˆ๊ฑฐ๋กญ๊ธฐ ๋•Œ๋ฌธ์— py.test์™€ model_mommy๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋น ๋ฅด๊ฒŒ ํ…Œ์ŠคํŠธ๋ฅผ ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•จ.

ํ…Œ์ŠคํŠธ ํŒŒ์ผ ๋ ˆ์ด์•„์›ƒ

์ž์‹ ์˜ git ํ”„๋กœ์ ํŠธ ํด๋” ์•ˆ .git/hooks/pre-commit ํŒŒ์ผ์— ์•„๋ž˜ ๋‚ด์šฉ์„ ๋„ฃ์œผ์„ธ์š”.

#!/bin/sh
FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -e '\.py$')
if [ -n "$FILES" ]; then
    flake8 $FILES
fi
# Pyenv ์„ค์น˜ (https://github.com/yyuu/pyenv-virtualenv)
brew install pyenv-virtualenv
# ~/.bash_profile ํŒŒ์ผ์— ์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

# ์‚ฌ์šฉํ•  Python ๋ฒ„์ „์„ ๋ฏธ๋ฆฌ ๊น”๊ณ  
pyenv install 3.6.0
@myungseokang
myungseokang / deploy_with_ebcli3_on_circleci.md
Created April 11, 2017 05:27 — forked from RobertoSchneiders/deploy_with_ebcli3_on_circleci.md
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI.

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.

Create a bash script to create the eb config file

@myungseokang
myungseokang / uwsgi.ini
Last active December 25, 2018 21:15 — forked from puilp0502/uwsgi.ini
Sample uwsgi ini configuration
[uwsgi]
# Django-related settings
# the base directory (full path)
chdir = /home/ubuntu/(project-dir)
# Django's wsgi file
module = (project-name).wsgi:application
# the virtualenv (full path)
home = /home/ubuntu/.venv/(venv-name)/
@myungseokang
myungseokang / GitCommitEmoji.md
Created August 27, 2017 15:20 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit ๐ŸŽ‰ :tada:
Version tag ๐Ÿ”– :bookmark:
New feature โœจ :sparkles:
Bugfix ๐Ÿ› :bug:
@myungseokang
myungseokang / vim-heroku.sh
Created September 16, 2017 07:34 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -