Skip to content

Instantly share code, notes, and snippets.

View seanmoon's full-sized avatar

S. S. A. Moon seanmoon

  • NYC
View GitHub Profile
@seanmoon
seanmoon / curl-with-times.sh
Created May 10, 2012 04:43
Speed test using curl
echo "Total time Start transfer Avg Download Speed"
for i in 1 2 3 4 5
do
curl -w "%{time_total}s\t\t%{time_starttransfer}s\t\t%{speed_download}\n" http://your.url.here -o outfile -s
done
@seanmoon
seanmoon / git-graph
Created April 30, 2011 18:16
visual branch history on the command line
#!/bin/bash
git log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
@seanmoon
seanmoon / lolbash.sh
Created March 25, 2011 16:43
LOLbash modified from http://www.doneed.net
# LOL!!1
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
alias rtfm='man'
alias visible='cat'
alias moar='less'
alias icanhas='mkdir'
@seanmoon
seanmoon / fresher.rb
Created December 2, 2010 14:37
when used with fsevent_watch.c from autotest, run the command specified in the loop.
class FSEventRefresh
def initialize
@changed = false
end
def changed?
if @changed
@changed = false
true
else
@seanmoon
seanmoon / spell.rb
Created November 20, 2010 00:36 — forked from evanfarrar/spell.rb
require 'rubygems'
require 'raspell'
class RdocSpellchecker
attr_accessor :badwords
def initialize
@sp = Aspell.new("en")
@sp.set_option("ignore-case","true")
end
def check(dirry)
#import <Foundation/Foundation.h>
@interface MockExpector : NSObject
+ (void)verifyMethodWasCalled;
+ (void)verifyMethodWasNotCalled;
+ (void)expect:(SEL)selector toBeCalledOn:(Class)class;
@end