Skip to content

Instantly share code, notes, and snippets.

Greetings and Welcome Explorer,

I am glad that you found your way here. You deserve better than another routine day of drudgery aboard the Stellar Patrol Ship Feinstein. I think we want to work with you.

Detroit Labs is in the business of creating mobile apps. We do this by inviting the best and most interesting people to join our team, and asking them to solve the hard problems that go along with building and shipping software. Since you are reading this, you may be one of those people. I hope so!

@magnusstahre
magnusstahre / post-checkout
Created November 6, 2012 04:48 — forked from jasonkarns/post-checkout
Post Checkout git hook to remind me about running certain commands when appropriate files have been modified
#!/bin/sh
if ! git diff-tree --quiet $1 $2 -- Gemfile
then
echo "\nGemfile modified: run \`bundle install\`\n"
fi
if ! git diff-tree --quiet $1 $2 -- db/migrate db/schema.rb db/structure.sql
then
echo "\nSchema modified: run \'rake db:migrate\'\n"
fi
def good_or_bad lines, patterns
lines.zip(patterns).all? { |(line, pattern)|
line.match pattern
}
end
lines = [ "line1", "line2", "line3" ]
patterns = [ "pattern1", "pattern2", "pattern3" ]
puts lines.zip patterns #=> [["line1", "pattern1"], ["line2", "pattern2"], ["line3", "pattern3"]] 
good_or_bad lines, patterns #=> false
@magnusstahre
magnusstahre / rot13.rb
Created September 17, 2011 17:43 — forked from rdammkoehler/rot13.rb
Teaching my 10yr old daughter about ROT-13
class String
def rot13
tr 'abcdefghijklmnopqrstuvwxyz', 'nopqrstuvwxyzabcdefghijklm'
end
end
describe 'String#rot13' do
let (:message) { "the quick brown fox jumps over the lazy dog" }
let (:encoded) { "gur dhvpx oebja sbk whzcf bire gur ynml qbt" }
@magnusstahre
magnusstahre / about.md
Created September 5, 2011 04:49 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer