Skip to content

Instantly share code, notes, and snippets.

Justin Hileman bobthecow

Block or report user

Report or block bobthecow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3855290
<?xml version="1.0"?>
<name>Truly Ergonomic Keyboard</name>
DIP switch settings:
1 2 3 4 5
View new.rb
last_response.body.should match_json({
user: {
id: :user_id,
username: 'chancancode',
full_name: 'Godfrey Chan',
email: '',
type: 'Administrator',
points: Fixnum,
homepage: /\Ahttps?\:\/\/.*\z/i,
View match_json.rb
require 'json_expressions'
RSpec::Matchers.define :match_json do |expected|
unless JsonExpressions::Matcher === expected
expected =
match do |actual|
actual = JSON.parse(actual) if String === actual
expected =~ actual
bobthecow / fishfish.rb
Created Jun 13, 2012
brew install fishfish
View fishfish.rb
require 'formula'
class Fishfish < Formula
homepage ''
url ''
depends_on 'autoconf' => :build
depends_on 'readline'
skip_clean 'share/doc'
View nanoc-completion.bash
# nanoc-completion
# ================
# Bash completion support for nanoc
# Installation
# ------------
View radio_mustach_example.html
<!DOCTYPE html>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/mustache.js"></script>
<div id="formWrapper">
View html_compressor.rb
require 'html_compressor'
class HtmlCompressor < Nanoc3::Filter
identifier :html_compressor
# Runs the content through htmlcompressor.
# This method optionally takes options to pass directly to htmlcompressor
# @param [String] content The content to filter
View Rules
# Rules:
compile '*' do
if not item.binary?
if item[:kind] == 'image'
layout 'image'
else if item[:kind] == 'link'
layout 'link'
layout 'item'
View gist:1366147
class Item
def pretty_date
"<time class=\"timeago created-at\" datetime=\"#{Time.parse(self[:created_at]).iso8601}\">#{Date.parse(self[:created_at]).strftime('%e %B %Y')}</time>"
View quine.php
<?php echo str_repeat(file_get_contents(__FILE__, false, null, __COMPILER_HALT_OFFSET__), 2);
<?php echo str_repeat(file_get_contents(__FILE__, false, null, __COMPILER_HALT_OFFSET__), 2);
You can’t perform that action at this time.