Skip to content

Instantly share code, notes, and snippets.

View jamesmoriarty's full-sized avatar
🔮
0xc0000005

James Moriarty jamesmoriarty

🔮
0xc0000005
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

@jamesmoriarty
jamesmoriarty / example.sh
Created May 7, 2022 11:24
Dump Docker image contents without shell access
$ docker export $(docker ps -lq) | tar tf - | egrep config
usr/sbin/tzconfig
usr/share/man/man5/config.5ssl.gz
usr/share/man/man5/x509v3_config.5ssl.gz
@jamesmoriarty
jamesmoriarty / gohack.mermaid
Last active January 1, 2022 00:01
gohack.exe sequence diamgram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jamesmoriarty
jamesmoriarty / monzo-alertmanager-config.yaml
Created April 7, 2021 12:16 — forked from milesbxf/monzo-alertmanager-config.yaml
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@jamesmoriarty
jamesmoriarty / http-connect-proxy.rb
Last active September 26, 2021 00:25
HTTP CONNECT by example
require 'socket'
listen_socket = TCPServer.new('127.0.0.1', 9292)
client_conn = listen_socket.accept
request_line = client_conn.gets
while(line = client_conn.gets) do
break unless line.include?(':')
end
@jamesmoriarty
jamesmoriarty / docker-copy
Created January 28, 2020 06:02
Docker Image Copy Files
#!/bin/sh
# ./docker-copy a25dae391089 /bin/prometheus ./
id=$(docker create $1)
docker cp $id:$2 $3
docker rm -v $id
set height 0
catch syscall close
catch syscall read
catch syscall lseek
disable 1 2
commands 2
disable 1 2
continue
@jamesmoriarty
jamesmoriarty / delete-custom-metrics
Last active December 2, 2023 20:18
Google Cloud Platform delete custom metrics via REST api
#!/bin/bash
set -x
set -e
project="XXX"
prefix="http"
metrics=$(
curl \
@jamesmoriarty
jamesmoriarty / blackbox-exporter.yml
Last active October 25, 2019 05:49
Manifest with heredoc config.file on start.
command:
- /bin/sh
- -c
- |
cat << EOF > blackbox.yml && /bin/blackbox_exporter --config.file=blackbox.yml
modules:
http_2xx:
prober: http
http:
tls_config:
#!/bin/sh
# cat /etc/os-release
# NAME="Amazon Linux"
# ...
sudo yum -y install git docker htop tree golang ruby
sudo systemctl enable docker