Skip to content

Instantly share code, notes, and snippets.

@badamrussell
badamrussell / index.html
Created January 9, 2014 18:11
css vertical alignment trick
<div class=frame>
<span class="helper"></span><img src="http://jsfiddle.net/img/logo.png" height=250 />
</div>
<div class=frame>
<span class="helper"></span><img src="http://jsfiddle.net/img/logo.png" height=25 />
</div>
<div class=frame>
<span class="helper"></span><img src="http://jsfiddle.net/img/logo.png" height=23 />
</div>
<div class=frame>
@badamrussell
badamrussell / test.rb
Created January 10, 2014 03:05
ruby testing
require 'benchmark'
Document = Struct.new(:id,:a,:b,:c)
documents_a = []
documents_h = {}
1.upto(10_000) do |n|
d = Document.new(n)
documents_a << d
documents_h[d.id] = d
end
searchlist = Array.new(1000){ rand(10_000)+1 }
@badamrussell
badamrussell / gist:9120601
Created February 20, 2014 18:52
remove spotlight from menu bar
to remove:
sudo mv /System/Library/CoreServices/Search.bundle /System/Library/CoreServices/Search.bundle.bak
killall SystemUIServer
and to re-enable:
sudo mv /System/Library/CoreServices/Search.bundle.bak /System/Library/CoreServices/Search.bundle
killall SystemUIServer