Skip to content

Instantly share code, notes, and snippets.

View jmnwong's full-sized avatar

Justin Wong jmnwong

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jmnwong on github.
  • I am jmnwong (https://keybase.io/jmnwong) on keybase.
  • I have a public key ASDsiuM7bZknhMlr2ge6M_L9HY7yFm4tLnDLLpkmYipuDwo

To claim this, I am signing this object:

set shell=/bin/bash
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
#begin include httpretrieve.repy
"""
<Program Name>
httpretrieve.repy
<Started>
August 19, 2009
<Authors>
Yafete Yemuru
import requests
url='http://www.letsrevolutionizetesting.com/challenge.json'
r = requests.get(url)
print r.text
while 'follow' in r.json():
result=r.json()['follow']
numid=result.split('?')[1]
print numid
r = requests.get(url+'?'+numid)
@jmnwong
jmnwong / .gitignore
Last active August 29, 2015 13:58 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
@jmnwong
jmnwong / gist:8980852
Last active August 29, 2015 13:56
Test OpenVPN in LXC + build TUN
## Run all these commands in container
sudo apt-get install curl wget openvpn uml-utilities
# creates a tun device in the container
sudo mkdir /dev/net
sudo mknod /dev/net/tun c 10 200
sudo chmod 666 /dev/net/tun
@jmnwong
jmnwong / gist:8959194
Created February 12, 2014 16:34
Install missing tun module and for Ubuntu 12.04/user-mode linux
sudo apt-get install uml-utilities build-essential linux-headers-`uname -r`
mkdir faketun
cd faketun
echo -e "#include <linux/module.h>\nstatic int start__module(void) {return 0;}\nstatic void end__module(void){return;}\nmodule_init(start__module);\nmodule_exit(end__module);">tun.c
echo -e "obj-m += tun.o\nall:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) modules\nclean:\n\tmake -C /lib/modules/\$(shell uname -r)/build/ M=\$(PWD) clean\nclean-files := Module.symvers">Makefile
make
sudo install tun.ko /lib/modules/`uname -r`/kernel/net/tun.ko
sudo depmod -a
sudo modprobe tun
@jmnwong
jmnwong / ST2 Cycle Tabbing
Created June 28, 2013 15:24
Makes CTRL-Tab cycle tabs in order for Sublime Text.
Put in (Preferences -> Key Bindings - User):
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
@jmnwong
jmnwong / bash
Created January 11, 2012 21:03 — forked from haf/bash
Installing graphite Ubuntu 11.10
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade
@jmnwong
jmnwong / about.md
Created August 9, 2011 14:48 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer