Skip to content

Instantly share code, notes, and snippets.

View soomtong's full-sized avatar
😇

YoungTaek soomtong

😇
View GitHub Profile
" Make Vim more useful
set nocompatible
" Use the OS clipboard by default (on versions compiled with `+clipboard`)
" Set color scheme!
colorscheme koehler
set clipboard=unnamed
" Enhance command-line completion
set wildmenu
" Allow cursor keys in insert mode
set esckeys
@soomtong
soomtong / mdb
Created August 28, 2014 07:40
mongo db manage script use /usr/local/bin/mdb with excution flag
#!/bin/bash
if [ -z $1 ] ; then
echo "Usage: $0 [start|stop|restart] "
exit 1
fi
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common
@soomtong
soomtong / cdb
Created August 28, 2014 07:40
couch db manage script use /usr/local/bin/cdb with excution flag
#!/bin/bash
if [ -z $1 ] ; then
echo "Usage: $0 [start|stop|restart] "
exit 1
fi
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common
@soomtong
soomtong / init_osx_env.sh
Created November 7, 2014 16:56
OSX defaults setting
# 키보드 오래 누르고 있을 때
defaults write -g ApplePressAndHoldEnabled -bool false
# 아이튠즈 한글 환경 강제
defaults write -app iTunes AppleLanguages "(ko)"
@soomtong
soomtong / rdb
Created November 18, 2014 13:21
redis db manage script
#!/bin/bash
## Please update your redis.conf demonize mode to yes `daemonize yes`
if [ -z $1 ] ; then
echo "Usage: $0 [start|stop|restart] "
exit 1
fi
# Source the common setup functions for startup scripts
@soomtong
soomtong / find-large-files.sh
Created January 8, 2015 21:00
find large files bash script
#!/bin/bash
find / -size +102400k -print|xargs ls -hl
@soomtong
soomtong / set-go-path-and-restart.sh
Last active August 29, 2015 14:17
set GO PATH this directory and restart App by daemon
#!/usr/bin/env bash
export GOPATH=$(pwd)
kill $(pgrep revel)
daemon bin/revel run pebbler prod
@soomtong
soomtong / domainlist.js
Last active October 10, 2015 19:48
get domainlist from rankey.com
//
// http://faultnote.tistory.com/337
//
var util = require('util');
var request = require('request');
var fs = require('fs');
var token = /asset|boheom|bohum|inus|life|ins|direct|inr|inz|youngm|jongsin/i;
var url = 'http://www.rankey.com/rank/ajax/ajax_rank_site_cate.php'; // ref. http://www.rankey.com/rank/rank_site_cate.php
@soomtong
soomtong / token-combine.js
Last active December 11, 2015 17:08
- 이런 코드 짜려고 굳이 파이썬 책 보며 코딩할 필요 없겠구나.
// combine keyword
var fs = require('fs');
fs.readFileSync('1.txt').toString().split('\n').forEach(function(line) {
var token = line;
fs.readFileSync('2.txt').toString().split('\n').forEach(function(line) {
var make = token.trim() + ' ' + line.trim();
console.log(make);
@soomtong
soomtong / swigFilter.js
Last active December 16, 2015 16:48
Simple substring filter
/*
checkout this
http://paularmstrong.github.io/swig/docs/#filters-custom
setup like below
// set template engine
var swig = require('swig');
var swigFilter = require('./swigFilter');
var swigTag = require('./swigTag');