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
@bignimbus
bignimbus / .vimrc
Last active May 17, 2025 18:19
Set iTerm2 title to current buffer in vim
" Set the title of the Terminal to the currently open file
function! SetTerminalTitle()
let titleString = expand('%:t')
if len(titleString) > 0
let &titlestring = expand('%:t')
" this is the format iTerm2 expects when setting the window title
let args = "\033];".&titlestring."\007"
let cmd = 'silent !echo -e "'.args.'"'
execute cmd
redraw!
@nowk
nowk / docker-run
Last active November 5, 2015 16:03
Basic command template around `docker run` to bootstrap some basic options
#!/bin/sh
set -e
if [ ! -n "$1" ] ; then
echo
cat <<EOF
USAGE:
./docker-run <command> [-- <docker options>]
@DarrenN
DarrenN / get-npm-package-version
Last active June 20, 2025 19:20 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@ericlagergren
ericlagergren / index.gohtml
Last active December 22, 2023 17:51
Hot-reloading / hot-swapping live template files in Go
My name is {{.Name}} and I'm {{.Age}} years old!!
@cpswan
cpswan / nginx.conf
Last active July 2, 2024 09:43
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
@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
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@bendavis78
bendavis78 / gist:827089ff8f2a8d8975ee
Last active January 4, 2025 22:11
Installing Arch Linux on Chromebook Pixel 2
@maxclaus
maxclaus / update-coreos-cloud-config.sh
Created February 28, 2015 03:08
Update coreos cloud config
#!/bin/bash
SERVER_IP=<MY_SERVER_IP>
# copy cloud-config.yml to the server
scp cloud-config.yml core@$SERVER_IP:~/
# validate cloud-config file
ssh core@$SERVER_IP "coreos-cloudinit -validate --from-file ~/cloud-config.yml"
if [[ $? == "0" ]]; then