Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View holman's full-sized avatar

Zach Holman holman

View GitHub Profile
@holman
holman / BRAINSTORMING.md
Created December 9, 2014 22:29
Examples you could use in order to better explain your programming language inheritance and OOP syntax instead of using cars, animals, and shapes.
  • Cats, as defined by how important they were as plot devices (the cat from The Matrix would inherit from ImportantCat, whereas the cat from Boondock Saints would inherit from DeadCat)
  • Batman (primarily as a way to describe situations in which a child has no parents)
  • Presidents of the United States (Nixon vs Cheney vs Garfield)
  • Zombies (Walking Dead vs World War Z vs Zombieland)
  • Zombie Presidents of the United States
  • Children in television shows, as grouped by whether they actually did cause their parents' separation
  • Radioactive attack squirrels bent on global hegemony, beamed down to Earth from the mirror universe USS Enterprise
  • George Carlins by decade
  • Cocaine
  • Metropolises, cities, towns, villages, and Detroits
@holman
holman / header-anchors.diff
Created January 19, 2015 20:37
add anchors to headings in github pages
diff --git a/_config.yml b/_config.yml
index 8f2dd40..fc83f8e 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,3 +1,6 @@
+markdown: redcarpet
+redcarpet:
+ extensions: [with_toc_data]
@holman
holman / tmobile.sh
Created June 29, 2015 21:32
Will someone destroy Comcast already
# Manually download each month's call history from t-mobile.com and toss them in
# a directory. Or do it automatically using computers, who cares.
#
# Install spark: https://github.com/holman/spark
cat * | grep 266-2278 | sort | cut -d, -f5 | spark
# ▂█▁▃▅
echo "fuck comcastttttttttttttttttttttttttttttttttttttttttt"
# ⒻⓊⒸⓀ ⒸⓄⓂⒸⒶⓈⓉ
@holman
holman / README
Created July 21, 2009 09:07 — forked from vangberg/README
# Deploying a Sinatra app to Heroku
## Database
The location of the database Heroku provides can be found in the environment
variable DATABASE_URL. Check the configure-block of toodeloo.rb for an example
on how to use this.
## Server
Heroku is serving your apps with thin, with means you have all your thin goodness available,
such as EventMachine.
require 'digest/sha1'
dictionary = ["solo","flex","scalable","rubyonrails","rails","cloud","web","hosting","ec2","aws","git","3des","abbrev","accessor","actionpack","active","activereload","addon","adjoin","aes","agile","ajax","alberti","algol","alias","allen","allman","aloha","amazon","AMI","amp","andreessen","android","apache","apple","applet","apricot","ar","arcade","array","assert","assoc","atbash","atkinson","awk","awsm","awstats","babbage","backus","balancers","bartle","base64","based","bash","bazeries","bdd","beck","becker","behavior","behlendorf","bell","benchmark","benchmarks","berkeleydb","berners","beta","betas","bford","bigdecimal","bignum","bigtable","biham","bin","bina","binaries","binary","bitsweat","bizstone","blank","bletchley","block","blocks","blog","blogs","boole","boolean","bot","box","bricklin","bridge","brin","browser","browsers","bsd","bug","bugs","build","builder","builders","builds","bytesize","c10k","cache","caches","caching","caesar","call","camp","capistrano","cardelli","carmack"
namespace :ci do
task :enqueue do
sleep 60 while FileTest.exists?('tmp/currently_running_tests')
`touch tmp/currently_running_tests`
end
task :dequeue do
`rm tmp/currently_running_tests`
end
@holman
holman / waves.txt
Created October 15, 2009 17:04 — forked from mislav/waves.txt
> This is a Shortwave configuration file
> http://shortwaveapp.com/
>
> Some triggers copied from benpickles (http://gist.github.com/43371)
>
> Urls may contain the following replacement tokens:
>
> %s → search terms
> %r → URL of current page
> %d → domain part of the current URL
@holman
holman / waves.txt
Created October 15, 2009 17:05 — forked from mislav/waves.txt
Shortwave conf
> This is a Shortwave configuration file
> http://shortwaveapp.com/
>
> Some triggers copied from benpickles (http://gist.github.com/43371)
>
> Urls may contain the following replacement tokens:
>
> %s → search terms
> %r → URL of current page
> %d → domain part of the current URL
named_scope :with_city, lambda {|city| city.present? ? {:conditions => {:city => city} : {}}
Search.with_city('Pittsburgh').size # => 2
Search.with_city(nil).size # => all
# Hitting
http://otter.topsy.com/trackbacks.js?callback=jsonp1272404811434&url=http%3A%2F%2Fzachholman.com%2F2010%2F04%2Fapple-is-petrified%2F&perpage=50
# Returns this JSON with only one result:
jsonp1272404811434({"request":{"parameters":{"url":"http://zachholman.com/2010/04/apple-is-petrified/","perpage":"50"},"response_type":"js","resource":"trackbacks","url":"http://button.topsy.com/trackbacks.js?perpage=50&url=http%3A%2F%2Fzachholman.com%2F2010%2F04%2Fapple-is-petrified%2F"},"response":{"page":1,"topsy_trackback_url":"http://topsy.com/tb/zachholman.com/2010/04/apple-is-petrified/","total":1,"perpage":50,"list":[{"permalink_url":"http://twitter.com/alexanderkahn/status/12966881983","date":1272404753,"content":"RT @holman: Why Apple (probably) won't fix iTunes:\n\nhttp://zachholman.com/2010/04/apple-is-petrified","date_alpha":"58 seconds ago","author":{"name":"Alex Kahn","url":"http://twitter.com/alexanderkahn","topsy_author_url":"http://topsy.com/twitter/alexanderkahn","photo_url":"http://a3.twimg.c