Skip to content

Instantly share code, notes, and snippets.

View t27duck's full-sized avatar
🦆

Tony Drake t27duck

🦆
View GitHub Profile
@willurd
willurd / web-servers.md
Last active June 3, 2025 15:43
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
@bhumphrey
bhumphrey / gist:3764983
Created September 22, 2012 03:10
Cherry-picking from another fork
git checkout <branch>
git fetch <other-fork-alias>
git cherry-pick <commit-hash>
git push <your-fork-alias>
class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private