Skip to content

Instantly share code, notes, and snippets.

View bragi's full-sized avatar

Łukasz Piestrzeniewicz bragi

View GitHub Profile
@bragi
bragi / gist:1283869
Created October 13, 2011 09:49
Stevey's Google Platforms Rant
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't really have SREs and they make engineers pretty much do everything
@bragi
bragi / gist:847088
Created February 28, 2011 08:36
Bootstrap WTF?!
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
CallInspector = Origin mimic do(
nesting = 0
entering = lecrox(
"#{"| " * nesting}+called #{call receiver}:#{call message name}(#{call arguments})" println
nesting ++
)
leaving = lecrox(
nesting --
#/usr/bin/env ruby
require 'benchmark'
def to_array_flatten(element)
[element].flatten
end
def to_array_splat(element)
[*element]
alias rt='nice time rake log:clear:test test'
alias rtu='nice time rake log:clear:test test:units'
alias rtf='nice time rake log:clear:test test:functionals'
alias rti='nice time rake log:clear:test test:integration'
alias rts='rm -f ../../log/test.log; nice time ruby'
alias rdm="rake db:migrate"
alias rdmr="rake db:migrate:redo"
alias rdd="rake db:schema:dump db:structure:dump"
alias migt="rdm && rdmr && rdd && rake db:test:clone_structure"
#!/usr/bin/ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
file = open(ARGV[1]) if ARGV[1]
file ||= STDIN
doc = Hpricot(file)
puts doc / ARGV[0]
An Evil Gist!
We couldn’t find that file to show.