Skip to content

Instantly share code, notes, and snippets.

View davidrupp's full-sized avatar

David Rupp davidrupp

View GitHub Profile

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 real

@davidrupp
davidrupp / bash_prompt_git_branch.bash
Created July 23, 2012 03:15
bash prompt with git branch ... my way
PS1='\h:\W$(__git_ps1 "(%s)") \u$ '
@davidrupp
davidrupp / Datomic News Updates
Created June 21, 2012 20:04 — forked from stuarthalloway/Datomic News Updates
Datomic update examples against a social news database
;; Datomic example code
;; demonstrates various update scenarios, using a news database
;; that contains stories, users, and upvotes
;; grab an in memory database
(use '[datomic.api :only (q db) :as d])
(def uri "datomic:mem://foo")
(d/create-database uri)
(def conn (d/connect uri))
@davidrupp
davidrupp / clojure.md
Created April 16, 2012 05:22
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

I appreciate the effort you've put into documenting this, but there are a number of inaccuracies here that need to be addressed. We get

@davidrupp
davidrupp / pullup.rb
Last active October 2, 2015 00:58
Find all git and svn repos in ~/Developer, and "git pull" or "svn up" as appropriate
#!/usr/bin/env ruby
Dir["#{Dir.home}/Developer/**/*"].select {|f| File.directory? "#{f}/.git/refs/remotes/p4"}.each do |path|
Dir.chdir(path) do |d|
puts("#{d} (perforce)")
`git p4 rebase`
end
end
Dir["#{Dir.home}/Developer/**/*"].select {|f| File.directory? "#{f}/.git/refs/remotes/origin"}.each do |path|
@davidrupp
davidrupp / gemmacs.rb
Created February 25, 2012 20:34
Open a gem's installed source code in emacs.
#!/usr/bin/env ruby
if ARGV.empty?
puts "Usage: gemmacs <name-of-gem>"
else
src = `gem which #{ARGV[0]}`.split.last
lib_dir = src.slice 0, src.rindex("lib")
`emacs -nw '#{lib_dir}'`
end
@davidrupp
davidrupp / gist:1861116
Created February 18, 2012 21:56 — forked from jlongster/gist:1712455
traditional lisp macros
;; outlet code for implementing traditional macro expansion
;; macros
(define (expand form)
(cond
((variable? form) form)
((literal? form) form)
((macro? (car form))
(expand ((macro-function (car form)) form)))
@davidrupp
davidrupp / lithp.rb
Created January 25, 2012 19:22 — forked from fogus/lithp.rb
class Lisp
def initialize
@env = {
:label => lambda { |(name,val), _| @env[name] = val },
:quote => lambda { |sexpr, _| sexpr[0] },
:car => lambda { |(list), _| list[0] },
:cdr => lambda { |(list), _| list.drop 1 },
:cons => lambda { |(e,cell), _| [e] + cell },
:eq => lambda { |(l,r), _| l == r },
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) },
@davidrupp
davidrupp / pallet_64bit_ubuntu.clj
Created November 11, 2011 16:38
Specify a generic 64-bit Ubuntu with Pallet
;; on AWS, this will default to a size of t1.micro
(def node-spec
(pallet.core/node-spec
:image {:os-family :ubuntu :os-64-bit true}
:network {:inbound-ports [22]}))
;; -*- Mode: Clojure; indent-tabs-mode: nil -*-
;;
;; Licensed to the Apache Software Foundation (ASF) under one or more
;; contributor license agreements. See the NOTICE file distributed
;; with this work for additional information regarding copyright
;; ownership. The ASF licenses this file to you under the Apache
;; License, Version 2.0 (the "License"); you may not use this file
;; except in compliance with the License. You may obtain a copy of the
;; License at http://www.apache.org/licenses/LICENSE-2.0 Unless
;; required by applicable law or agreed to in writing, software