Skip to content

Instantly share code, notes, and snippets.


I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal

I certainly use a black background. I'm not sure about the other RSpec core folks. Regardless, if there are some color changes we can make that would make output look good on a larger variety of backgrounds, we'll certainly consider that (do you have some suggested changes?). In the meantime, the colors are configurable, so you can change the colors to fit your preferences on your machine. First, create a file at

0xabad1dea /
Last active Aug 14, 2020
Singular They in Technical English

Guidelines for Singular They in Technical English

by 0xabad1dea, December 2014

This document is an RFC of sorts for increasing the adoption rate of Singular They in technical English. This is not an ultimatum; this is not shaming anyone who has done otherwise; and this is definitely not applicable to any other language.

What is Singular They?

anonymous /
Created Sep 23, 2014
Rules for "All out of bubblegum"

All Outta Bubblegum

This game is copyright 2001, Michael "Epoch" Sullivan and Jeffrey Grant. If you want to repost it or whatever, drop me an email.

Characters in All Outta Bubblegum have one stat -- Bubblegum. It's technically a number which varies from 0 through 8, though the designers highly, highly recommend that you don't do anything so banal as write down a number, and, instead, pass out actual sticks of bubblegum to the players. This will also help when you play All Outta Bubblegum drunk, which is, let's be blunt, probably the only time you'd even consider playing this game.

Bubblegum always starts out at 8.


View gist:5936381
curl --get '' --data 'id=353218566180442112' --header 'Authorization: OAuth oauth_consumer_key="DCtwdGNS38Sr9JNXwS53cQ", oauth_nonce="87c91da7f4d6d61ec9d81fd0fb7c7980", oauth_signature="%2FD09dk9pNQ4uj3szTpYWThetfc8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1373049118", oauth_token="7865582-sVflpbIO5WH1IDf2oSWlUFIfhNsRMq1aZQivXB3gI0", oauth_version="1.0"' | python -mjson.tool
bkerley / repl.zsh
Created Jul 5, 2013
riak-admin repl
View repl.zsh
#!/usr/bin/env zsh
echo -n "riak-admin> "
while read inputline; do
echo `$RIAK_ADMIN_PATH $inputline`
echo -n "riak-admin> "
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

tbeseda / wobble.css
Created Feb 8, 2012
slowly wobble an element with CSS -- shamelessly ripped from love.travis-ci
View wobble.css
/* just webkit, 'cause yeah... */
@-webkit-keyframes wobble {
0% { -webkit-transform: rotate(0deg); }
20% { -webkit-transform: rotate(2deg); }
50% { -webkit-transform: rotate(-2deg); }
100% { -webkit-transform: rotate(0deg); }
.wobble { -webkit-animation: wobble 5s infinite; }
aphyr / gist:1375435
Created Nov 18, 2011
Riak-client transparent failover
View gist:1375435
Each . is a successful get/put. Rescued ... shows where an exception was
raised and retried by the client. [float, float, float] are the error_rates
of the three nodes, exponentially decaying. When I kill a node, the exception
is caught and retried transparently. If any were to fail three times
successively, an X would be printed.
Throughout this test I'm restarting nodes left and right at random. So long
as fewer than two crash at once, no errors are raised.
This works so long as all operations in a given block are replayable.
View aquamacs-editor.rb
#!/usr/bin/env ruby
# aquamacs-editor: my $EDITOR for Aquamacs. Starts Aquamacs, waits
# for emacs-server to load, then runs emacsclient with the given
# arguments. If data is piped to stdin, it's buffered to a temporary
# file and passed to emacsclient instead. Waits for 'C-x #' unless
# invoked with -n.
# sstephenson 2010-09-12
require "tempfile"
View PWMfanController.c
/*This code for a PIC12F615 compiles in mikroC for PIC
It takes an analog value from a dash-mounted potentiometer and drives a MOSFET proportional to the input. The MOSFET pulses the low-side of a blower motor in
a 1997 Mitsubishi Mirage, providing 128 speeds*/
void main() {
int anin=0, ramped=255;
unsigned long temp = 0;