Skip to content

Instantly share code, notes, and snippets.

@holman
holman / jekyll_media_length.rb
Created Oct 19, 2015
Drop the length of a particular audio file and junk into your Jekyll page.
View jekyll_media_length.rb
# jekyll_media_length / by @holman
#
# Drop the length of a particular audio file and junk into your Jekyll page.
# (See https://twitter.com/Una/status/655856628198014976 for more context).
#
# INSTALL:
#
# brew install taglib
# gem install taglib-ruby
#
@holman
holman / tmobile.sh
Created Jun 29, 2015
Will someone destroy Comcast already
View tmobile.sh
# 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 / header-anchors.diff
Created Jan 19, 2015
add anchors to headings in github pages
View header-anchors.diff
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 / emoji_test.rb
Last active Jun 18, 2020
A snapshot of the tests we use internally at GitHub to help edit our blog posts before they go out to everybody. For more information, take a peek at http://zachholman.com/posts/how-github-writes-blog-posts
View emoji_test.rb
require_relative "test_helper"
require "open-uri"
require "net/http"
class EmojiTest < Blog::Test
def test_no_emoji
posts.each do |post|
content = File.read(post)
refute_match /:[a-zA-Z0-9_]+:/, content,
@holman
holman / BRAINSTORMING.md
Created Dec 9, 2014
Examples you could use in order to better explain your programming language inheritance and OOP syntax instead of using cars, animals, and shapes.
View BRAINSTORMING.md
  • 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 / example.png
Created Nov 5, 2014
A quick Hubot script to display Uber surge pricing from a particular point (LIKE AN OFFICE).
View sorted-debug-strings.json
{"here":25,"wtf":16,"wat":12,"lolol":11,"derp":9,"poop":8,"foo":8,"wut":6,"hola":6,"yo":6,"fuck":5,"test":4,"shit":4,"huh":4,"hello":3,"got here":3,"butts":3,"herp":3,"bar":3,"asdf":3,"ohai":3,"hell":3,"you got here":2,"sup":2,"bleh":2,"here 1":2,"here 2":2,"lol":2,"poo":2,"i like cheese":2,"fuuu":2,"lala":2,"omg":2,"hello?":2,"holla":2,"holman":2,"dupa":2,"lalala":2,"balls":2,"woot":2,"blah":2,"welp":2,"moo":2,"boom":2,"cat":2,"horse":1,"chk1":1,"coucou":1,"poldo":1,"asasdasdasdasd":1,"meow":1,"twerk -->":1,"ebasa":1,"dick fingers":1,"aaaaaaaaa":1,"hotdogs":1,"heyo":1,"chicken dinner":1,"woo":1,"ffs":1,"blip tip":1,"gah":1,"AREYOUKIDDING":1,"cocknobs":1,"PORTC = 0xFF":1,"haha":1,"apa":1,"wtfbbq":1,"wtffu":1,"prout":1,"eh":1,"goddammit2":1,"fuckthis1":1,"debug2":1,"debug1":1,"dog":1,"stip":1,"blag":1,"3💨":1,"yay":1,"hey grl":1,"heyheyhey":1,"die mofo":1,"nay":1,"boom!":1,"programming is stupid I hate computers who invented this fucking proffession anyway":1,"fuck you":1,"hi":1,"caca":1,"what the fuck is going
@holman
holman / Guthrie IP.md
Last active Aug 4, 2016
Woody Guthrie, on intellectual property.
View Guthrie IP.md

This song is Copyrighted in U.S., under Seal of Copyright # 154085, for a period of 28 years, and anybody caught singin it without our permission, will be mighty good friends of ourn, cause we don’t give a dern. Publish it. Write it. Sing it. Swing to it. Yodel it. We wrote it, that’s all we wanted to do.

@holman
holman / mpd.rb
Last active Feb 21, 2016
A forumula for mpd that maybe won't crash all the time on m4a files on OS X. Currently on https://github.com/mxcl/homebrew/pull/19368/files, waiting to be merged upstream.
View mpd.rb
require 'formula'
class Mpd < Formula
homepage 'http://www.musicpd.org/'
url 'http://www.musicpd.org/download/mpd/0.17/mpd-0.17.4.tar.bz2'
sha1 'e3a16b5d784c3699b151e72cfa58d0ea54a49b13'
head "git://git.musicpd.org/master/mpd.git"
You can’t perform that action at this time.