Skip to content

Instantly share code, notes, and snippets.

View priestjim's full-sized avatar

Panagiotis PJ Papadomitsos priestjim

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

@priestjim
priestjim / keybase.md
Created December 13, 2017 23:57
Keybase verification gist

Keybase proof

I hereby claim:

  • I am priestjim on github.
  • I am omnilectual (https://keybase.io/omnilectual) on keybase.
  • I have a public key whose fingerprint is 20EA 81BE 8D14 EA28 A5AE 5CB7 488B 76F6 650A CA9D

To claim this, I am signing this object:

@priestjim
priestjim / chef-cleanup-stale-nodes
Created March 29, 2013 11:54
An easy way to cleanup stale nodes (left from autoscaling, Vagrant/Vagabond boxes etc) on a Chef server. Use this on your chef-server role cookbook. Warning: this requires the Chef server client to be an admin!
# Modify the stale time accordingly. Currently, this is set to 2 days.
# You can also modify the search query to include only development/QA environments like:
# chef_last_run:[* TO #{Time.now.to_i - (86400 *2)}] AND (chef_environment:dev OR chef_environment:test)
require 'time'
if Chef::ApiClient.load(node.name).admin
Chef::Log.info("This is an administrative node. Stale node cleanup will take place")
search(:node, "ohai_time:[* TO #{Time.now.to_i - (86400 *2)}]").each do |n|
next if n.name.eql?(node.name) # Skip ourselves!
@priestjim
priestjim / knife-multi-project-config
Created December 9, 2012 12:17
Managing a number of chef installations/knife configs via a central one
# Enter this code alone in your ~/.chef/knife.rb
# The directory structure is expected to be like
# $HOME/Code
# $HOME/Code/ChefSetup1
# $HOME/Code/ChefSetup2
# Each of the project directories should contain their respective knife config like
#
# $HOME/Code/ChefSetup1/.chef/knife.local.rb
# $HOME/Code/ChefSetup2/.chef/knife.local.rb
#
@priestjim
priestjim / chef-noatime-and-swap.rb
Created November 29, 2012 19:01
A quick (hacky) Chef recipe for adding noatime and a swap file in case a swap file does not exist
# Enable noatime on local ext3/4 & xfs filesystems
fstab = File.open('/etc/fstab',"r")
newlines = Array.new
needremount = Array.new
ihaveswap = false
fstab.each do |line|
# Tokenize each fstab line with a space separator
tokens = line.split
if tokens[2] == "swap"