Skip to content

Instantly share code, notes, and snippets.

@6d61726b760a
6d61726b760a / tssh.sh
Created May 28, 2017 23:32
start an ssh session in a new tmux window
#!/bin/bash
if [ $# -eq 0 ] || [ $# -gt 1 ];
then
echo "usage: r [username]@hostname"
exit
fi
input="$*"
@6d61726b760a
6d61726b760a / mysql_repl_check.sh
Last active May 1, 2019 13:42 — forked from gchaix/mysql_repl_check.sh
mysql replication check script
#!/bin/bash
#--- Configurables ------------------------------------------
# replication delay threshold
TH_SECONDS_BEHIND=5
# notifcation email (if blank, no email will be sent)
EMAIL_ADDR=""
#------------------------------------------------------------

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

@6d61726b760a
6d61726b760a / readahead
Created March 27, 2019 04:07 — forked from openit/readahead
readahead initscript
#!/bin/bash
#
# readahead set readhead for specific block devices
#
# chkconfig: 35 85 15
# description: set readhead for specific block devices
# processname:
#
### BEGIN INIT INFO
# Provides: readahead
@6d61726b760a
6d61726b760a / lambda_sftp.py
Last active April 30, 2019 04:28
lambda function to sftp files from s3 to anywhere else
import boto3
import os
import paramiko
#
# use a trigger to copy files from s3 to an on premise server
#
# TODO:
# configuration using lambda environment vars
#
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@6d61726b760a
6d61726b760a / eve_name_gen.py
Last active April 1, 2020 22:08
eve name generator
import random
# reverse engineering:
# https://www.fantasynamegenerators.com/scripts/gallenteNames.js
# https://www.fantasynamegenerators.com/scripts/amarrNames.js
# https://www.fantasynamegenerators.com/scripts/minmatarNames.js
# https://www.fantasynamegenerators.com/scripts/caldariNames.js
def namelist(race):
"""return a list of strings used to generate names"""
import random
import xkcdpass.xkcd_password as xp
# generate random passwords
# a variation on https://github.com/redacted/XKCD-password-generator/blob/master/examples/example_import.py
def random_capitalisation(s, chance):
new_str = []
for i, c in enumerate(s):
new_str.append(c.upper() if random.random() < chance else c)
import csv
'''
export a 1password csv formatted file to lastpass csv formatted file
this is really only suitable for logins only
essentially we are just renaming the following fields
title > name
@6d61726b760a
6d61726b760a / python_pyenv.md
Last active June 11, 2020 04:40
setup python