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
@DazWorrall
DazWorrall / Output
Created February 9, 2012 13:06
Testing file upload handling in Flask
in upload handler
in file close
..
----------------------------------------------------------------------
Ran 2 tests in 0.021s
OK
@hayageek
hayageek / Google URL Shortener API
Last active May 21, 2019 11:57
Google URL Shortener API Javascript Example
<html>
<head>
</head>
<script type="text/javascript">
function makeShort()
{
var longUrl=document.getElementById("longurl").value;
var request = gapi.client.urlshortener.url.insert({
'resource': {
'longUrl': longUrl
@RobertoSchneiders
RobertoSchneiders / deploy_with_ebcli3_on_circleci.md
Last active December 24, 2024 08:15
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 1.0.

If you are using the Circle CI 2.0, take a look at this article from ryansimms

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.
@parmentf
parmentf / GitCommitEmoji.md
Last active July 6, 2025 14:04
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:
@perhapsspy
perhapsspy / django-test-easy-and-fast.md
Last active May 20, 2022 05:06
Django์—์„œ Test ์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ํ•˜๊ธฐ

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

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

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

@evansde77
evansde77 / mock_requests.py
Last active June 11, 2025 18:19
Example of mocking requests calls
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError
@nobitagit
nobitagit / iterm2.md
Last active July 30, 2024 01:01
iterm2 cheatsheet

This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.

Tabs and Windows

Function Shortcut
Previous Tab โŒ˜+ Left Arrow
Next Tab โŒ˜+ Right Arrow
Go to Tab โŒ˜ + Number
# Pyenv ์„ค์น˜ (https://github.com/yyuu/pyenv-virtualenv)
brew install pyenv-virtualenv
# ~/.bash_profile ํŒŒ์ผ์— ์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

# ์‚ฌ์šฉํ•  Python ๋ฒ„์ „์„ ๋ฏธ๋ฆฌ ๊น”๊ณ  (์ตœ์‹ ๋ฒ„์ „์„ ์“ฐ์„ธ์š”, ์˜ˆ๋กœ 3.6.1์„ ๋“ค๊ฒ ์Šต๋‹ˆ๋‹ค.)
pyenv install 3.6.1

์ž์‹ ์˜ 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
@puilp0502
puilp0502 / uwsgi.ini
Created June 26, 2017 15:37
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)/