Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active April 20, 2024 01:40
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@ri0day
ri0day / memcache_cli.sh
Created December 30, 2011 08:54
bash memcache cli
#!/bin/bash
#filename cm.sh
#author:wumin
#---Date:2011.12.29 pm---
#notice:not suport kind of ubuntu and debian system.(debian not suport /dev/tcp/host/port stye )
usage() {
format_usage="Usage:\n