Skip to content

Instantly share code, notes, and snippets.

View maxtortime's full-sized avatar

Kim Taehwan maxtortime

View GitHub Profile
@space.route('/write', methods=['GET', 'POST'])
@login_required
@roles_required('member')
def write():
form = BoardWriteForm()
if not current_user.has_role('admin'):
form.type_.choices = form.type_.choices[1:]
if form.validate_on_submit():
@maxtortime
maxtortime / dfs.js
Last active December 7, 2017 04:03
Simple DFS (if it is plain js object)
const root = {};
const visit = [];
let vn = 0;
function dfs(v) {
Object.keys(v).forEach(function (k) {
if (!visit[vn++]) {
if (typeof(v[k]) === 'object') {
console.log(k, typeof(k));
dfs(v[k]);
@maxtortime
maxtortime / nginx.conf
Created November 21, 2017 13:43
docker-compose+flask+nginx+certbot nginx configuration
events {
}
http {
upstream certbot_upstream{
server certbot:80;
}
server {
listen 80;
@maxtortime
maxtortime / Dockerfile
Last active March 31, 2018 22:41
flask-docker-compose-example
FROM python:3.5-alpine
RUN apk add --no-cache build-base libffi-dev postgresql-dev
WORKDIR /code
ADD ./requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt
ADD . /code
@maxtortime
maxtortime / cli.md
Last active August 31, 2017 04:54
My cli commands
@maxtortime
maxtortime / tmux-cheatsheet.markdown
Created January 18, 2017 04:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@maxtortime
maxtortime / .zshrc
Created January 7, 2017 06:06
my zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/tkim/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster-newline"

The Moment 메인 메뉴 계획

  • Unity Hierarchy 는 건드리지 않는다고 가정하자.
  • 민재가 구현한 코드를 최대한 리팩토링 해보도록 한다.
  • 새로운 기능은 따로 표시해 놓음

UI 동작 관련

MainFrame 동작

@maxtortime
maxtortime / git-command
Created August 26, 2016 05:19
유용한 git 설정
git status -uno # Untracked file 들은 무시
@maxtortime
maxtortime / iter_delete_repo.py
Created August 23, 2016 07:40
Delete repository by github3.py api.
import github3
gh = github3.login(token='your access token')
for repo in gh.iter_user_repos(login='maxtortime'):
choice = str(input(repo.name + ' '))
if choice == 'd':
repo.delete()
else: