Skip to content

Instantly share code, notes, and snippets.

View adeolaawoyemi's full-sized avatar
🏠
Working from home

Adeola Awoyemi adeolaawoyemi

🏠
Working from home
  • Yahoo
  • San Jose, CA
View GitHub Profile
@willurd
willurd / web-servers.md
Last active November 10, 2025 16:13
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
@ryanjbonnell
ryanjbonnell / gist:3880048
Last active March 23, 2023 18:01
Install Memcache on Mac OS X 10.8 "Mountain Lion"
# memcached requires libevent
cd /usr/local/src
curl -L -O http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
tar -xvzf libevent-2.0.17-stable.tar.gz
cd libevent-2.0.17-stable*
./configure
make
sudo make install
# Compile memcached utility
@nlindley
nlindley / launch_rails_app.applescript
Created August 22, 2012 18:45
Quick and dirty AppleScript to set up my terminal windows the way I like for a Rails project.
tell application "Finder"
set FolderPath to (choose folder default location alias ((home as text) & "RailsApps"))
set PosixPath to POSIX path of FolderPath
end tell
tell application "Terminal"
activate
@iamkristian
iamkristian / vim-shortcuts.txt
Created August 10, 2012 08:11
A list of shortcuts I use a lot in vim.
# c == ctrl
# Note capital letters marks the use of shift.
# ! will force your command.
# Navigation
h Moves left.
j Moves down.
k Moves up.
l Moves right.
H Moves the cursor to the top of the screen.
@hyle
hyle / getagist.py
Created July 30, 2011 18:50
fetch files from a public gist
#!/usr/bin/env python
__license__ = 'http://www.opensource.org/licenses/mit-license.php (MIT)'
__author__ = 'Andrea Baresi'
from urllib2 import Request, urlopen
import sys
import json
METADATA_URL = 'http://gist.github.com/api/v1/json/%s'
@philchristensen
philchristensen / svn-color.py
Created August 10, 2010 20:20
Color-Coded `svn status`

First there was: http://snipplr.com/view/15246/color-coded-svn-status

Then there was: http://snipplr.com/view/16540/color-coded-svn-status-v2

A few days ago, I found a handy script online that colorized the output of SVN status. It worked pretty well, but needed a little polish and a couple of tweaks to make it use more common Python idioms. As I continued to use it and fix bugs and inefficiencies, I ended up replacing nearly every line in the original, but it was still a great starting point.

Additional changes include ANSI word-wrapping, a configurable tab expansion feature (for better code alignment), the 'colorizedSubcommands' sequence so that only applicable commands get colorized, use of proper subprocess module calls so that piping through less will work (for example, try svn-color diff | less -r to see colorized diff output).

To use, stick it somewhere, make executable (`chmod 7