Skip to content

Instantly share code, notes, and snippets.

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

@codeslinger
codeslinger / 2fa
Created April 5, 2020 12:58 — forked from MineRobber9000/2fa
2-factor authentication terminal app in Python
#!/usr/bin/env python
import os, os.path, stat, sys, base64
# TOTP lib inlined
import time, hmac, base64, hashlib, struct
def pack_counter(t):
return struct.pack(">Q", t)
@codeslinger
codeslinger / paramiko-proxy.py
Created December 30, 2019 16:20 — forked from ovidiucs/paramiko-proxy.py
Paramiko Connect via proxy
#!/usr/bin/env python
#-*- coding:utf8 -*-
# sources
# 1. https://gist.github.com/tell-k/4943359#file-paramiko_proxycommand_sample-py-L11
# 2. https://github.com/paramiko/paramiko/pull/97
# info: http://bitprophet.org/blog/2012/11/05/gateway-solutions/
# local -> proxy-server -> dest-server
# ~/.ssh/config
#
# Host proxy-server
@codeslinger
codeslinger / reinvent-2017-youtube.md
Created December 5, 2017 19:07 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@codeslinger
codeslinger / weighted_random_sampling.md
Created September 8, 2017 18:58 — forked from O-I/weighted_random_sampling.md
[TIx 8] Weighted Random Sampling in Ruby

One of the many reasons I love working with Ruby is it has a rich vocabulary that allows you to accomplish your goals with a minimal amount of code. If there isn't a method that does exactly what you want, it's usually possible to build an elegant solution yourself.

Let's take the example of simulating the rolling of a die.

We can represent a die as an array of its faces.

die = [*?⚀..?⚅]
# => ["⚀", "⚁", "⚂", "⚃", "⚄", "⚅"]
@codeslinger
codeslinger / variants.c
Created June 26, 2017 13:46
Tagged unions (a.k.a variants) in C
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#define var __auto_type
#define let __auto_type const
static inline void * variant_cast(void * variant_ptr, ptrdiff_t desired_tag) {
ptrdiff_t * variant_tag = (ptrdiff_t *)variant_ptr;
assert(*variant_tag == desired_tag);
#!/usr/bin/env python2.7
from __future__ import print_function
import commands
import os
import stat
from gitlab import Gitlab
def get_clone_commands(token, repo_root):
con = Gitlab("http://gitlab.your.domain", token)
@codeslinger
codeslinger / reclaimWindows10.ps1
Created January 9, 2017 00:40 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
@codeslinger
codeslinger / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Created May 14, 2016 01:03 — forked from zg/freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites