Skip to content

Instantly share code, notes, and snippets.

View maxtortime's full-sized avatar

Kim Taehwan maxtortime

View GitHub Profile
@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 / 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:
@maxtortime
maxtortime / cli.md
Last active August 31, 2017 04:54
My cli commands
@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 / 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]);
@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 / 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 / example.py
Created April 17, 2018 09:30
python apscheduler example
import json
import time
import os
import requests
import collection
import logging
import time
from apscheduler.schedulers.blocking import BlockingScheduler
@maxtortime
maxtortime / settings.json
Last active April 29, 2018 03:20
Adjust eslint-plugin-vue
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"eslint.enable": true,
"files.trimTrailingWhitespace": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.DS_Store": true,
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,