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
<html>
<head>
<title>Clipboard.js demo</title>
<style>
.tooltipped {
position: relative
}
.tooltipped:after {
position: absolute;
z-index: 1000000;
"""
Django settings for djangogirls_tutorial project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
{
"SECRET_KEY": "newew42l$!)no&7ad7%3j-8l^&ea=0)bh&80z_ul72$e-jsrbn"
}
@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 쉽고 빠르게 하기

자신의 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 / loop.js
Created April 25, 2017 07:23
Youtube player with loop using Iframe API
<script>
// Inject this code
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
@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 / nginx_configfile
Created July 27, 2017 13:05
Nginx Configuration file
server {
listen 80;
server_name example.com www.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static {
# STATIC ROOT
alias /home/ubuntu/(project_dir)/staticfiles;
expires -1;
}