Skip to content

Instantly share code, notes, and snippets.

View nowk's full-sized avatar

Yung Hwa Kwon nowk

  • damncarousel
  • New York, NY
View GitHub Profile
*.vdi
*.*.swp
*.*.swo
.bundle
.vendor
.vagrant
node_modules
log
tmp
start-x:
Xvfb :99 -ac -screen 10 1024x768x16
export DISPLAY=:99
start-mongodb:
sudo rkt run --insecure-skip-verify \
--volume=volume-data-db,kind=host,source=/data/db \
mongo
[Unit]
Description=App Redis Sidekick
Requires=docker.service
Requires=etcd.service
After=docker.service
After=etcd.service
After=app-redis.service
BindsTo=app-redis.service
@nowk
nowk / console
Last active August 29, 2015 14:24 — forked from dmitriy-kiriyenko/console
apt-get install xvfb
apt-get install firefox
@nowk
nowk / vim_install.sh
Created May 1, 2015 00:56
Vim install from source. Specific installation notes on lua.
cd ~/opt
hg clone https://vim.googlecode.com/hg/ vim
# Lua
sudo apt-add-repository ppa:archiveteam/wget-lua
sudo apt-get update
sudo apt-get install lua5.2
cd ~/opt/vim
make distclean
@nowk
nowk / timezones
Last active June 4, 2016 13:47 — forked from ykessler/timezones
[
{"group":"US (Common)",
"zones":[
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"},
{"value":"America/New_York","name":"New York (Eastern)"},
{"value":"America/Chicago","name":"Chicago (Central)"},
{"value":"America/Denver","name":"Denver (Mountain)"},
{"value":"America/Phoenix","name":"Phoenix (MST)"},
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"},
{"value":"America/Anchorage","name":"Anchorage (Alaska)"},
@nowk
nowk / use.go
Last active June 4, 2016 13:48 — forked from elithrar/use.go
r := mux.NewRouter()
// Single handler
r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging)
// All handlers
http.Handle("/", recovery(r))
// Sub-routers
apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json}
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'capybara/rspec'
require 'webmock/rspec'
require 'factory_girl'
require 'factory_girl_rails'
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
package main
import (
"fmt"
"runtime"
"sync"
"time"
)
func main() {
@nowk
nowk / wordcount.go
Created July 8, 2014 01:46
Wordcount - Go Guide #43
package wordcount
import "strings"
func WordCount(s string) map[string]int {
var (
arrOfWords []string
wordMap map[string]int
)