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 4, 2023 09:07
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 23, 2024 11:27
Git Commit message Emoji
@perhapsspy
perhapsspy / django-test-easy-and-fast.md
Last active May 20, 2022 05:06
Django에서 Test 쉽고 빠르게 하기
@evansde77
evansde77 / mock_requests.py
Last active May 30, 2024 10:11
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 August 24, 2023 12:16
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)/