Skip to content

Instantly share code, notes, and snippets.

import code
from myapp import app
env = {
'app': app,
}
with app.app_context():
code.interact(local=env)
@seoh
seoh / Package Control.sublime-settings
Last active August 29, 2015 14:11
Sublime Text Preferences
{
"installed_packages":
[
"AutoFileName", // 열려있는 디렉토리 기준으로 리소스의 경로 자동 완성
"Better CoffeeScript", // CoffeeScript 추가 Snippet들
"DashDoc", // Dash의 Snippet 연동
"Diffy", // 2 Column으로 파일을 열면 비교
"DocBlockr", // Doxygen 스타일 등의 주석 포맷 자동생성
"Emmet",
"FixMyJS", // 뭔가 구림. 잘 안씀.
@rkJun
rkJun / Back_to_the_Mac_20120805.css
Last active October 9, 2015 10:37
Safari, Google Chrome Font Style Sheet for Mac
//# Link (출처) : http://macnews.tistory.com/162
//# Safari/Google Chrome Korean Font Style Sheet for OS X Mountain Lion
//#
//# Google Chrome : ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css
@font-face {
font-family: AppleGothic;
src: local("Apple SD Gothic Neo"),
local("Nanum Gothic");
}
@mytory
mytory / gist:6238053
Created August 15, 2013 03:33
my .bash_profile
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\n\[\e[0m\]$ '
export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
export EDITOR=nano
PATH=$PATH:/usr/local/mysql/bin
alias ls='gls --color=auto -F'
source .git-completion.bash
 아쏜석   처샤져  쌱셔산썩  사아우아아
밯     빠   부 아   아   아
 산썩수  우   주 샥쏘뻐사    싹
    맣 석   차 뽀  아    희
어어샤여   아아아  오   아   우
@gmr
gmr / consul.lua
Created July 14, 2014 17:03
Dynamic Nginx upstream nodes using Consul
module("resty.consul", package.seeall)
_VERSION = '0.1.0'
function service_nodes(service)
local http = require "resty.http"
local json = require "cjson"
local hc = http:new()
local upstream = ""
# 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
@alanhamlett
alanhamlett / api.py
Last active January 24, 2023 21:03
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@gmccreight
gmccreight / master.vim
Last active September 23, 2023 08:41
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)