Skip to content

Instantly share code, notes, and snippets.

@andrewbroman
andrewbroman / mock.rb
Created July 10, 2012 15:37
Ruby: on-the-fly mock
# Thanks to tenderlove on Peepcode play by play
tc = self
klass = Class.new(Client) do
define_method(:get) do |username|
tc.assert_equal 'foobar', username
sample
end
end
@andrewbroman
andrewbroman / scope.coffee
Created July 5, 2012 18:41
CoffeeScript: global variable
root = (exports ? window)
root.courseTopic = courseTopic
@andrewbroman
andrewbroman / gist:3054241
Created July 5, 2012 15:07
CSS: Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@andrewbroman
andrewbroman / gist:3054198
Created July 5, 2012 15:01
HTML: Starting template
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title></title>
<link rel="stylesheet" href="style.css">
</head>
<body>