Skip to content

Instantly share code, notes, and snippets.


Jeremiah Roth rothwerx

View GitHub Profile
nmussat / find.repo.biggest.files
Created Jan 4, 2010
Find biggest files from a Git repository
View find.repo.biggest.files
# Find biggest files from a Git repository
# See
LINES=`git verify-pack -v .git/objects/pack/pack-*.idx | grep blob | sort -k 3 -n | tail -${MAX_FILES}`
for LINE in $LINES

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

l15n /
Created Jul 13, 2012 — forked from jasonrudolph/
List remote Git branches and the last commit's author and author date for each branch. Sort by most recent commit's author date.
# Credit
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai %ar by %an" $branch | head -n 1` \\t$branch; done | sort -r
ryanobjc /
Created Sep 6, 2012
package up graphite using fpm
apt-get install python-setuptools python-django-tagging python-pysqlite2 python-memcache python-ldap python-django python-cairo-dev
mattpascoe / dhcpparse.awk
Last active Nov 29, 2018
An AWK script to parse ISC dhcpd configuration files into output to load into OpenNetAdmin
View dhcpparse.awk
#!/usr/bin/awk -f
# Author: Matt Pascoe -
# This awk script is used to extract relavant information from a dhcpd.conf
# config file and build output with appropriate fields. This can be
# used to bootstrap a new database from existing site data.
# As usual, inspect the output for accuracy.
# Also you will get three types of output, subnet,pool,host. You must
# add the subnet information first, then pool, then host.
jasonberanek /
Last active Jan 29, 2018
Enabling VNC support in the VMware ESXi 5.x Firewall

VMware ESXi includes a built in VNC server that can be used to access a VMs console for manipulation via automated tools (e.g., veewee) or by users on platforms where the vSphere Client is not supported. In ESXi 5.x, the built-in firewall does not allow VNC traffic to be received by the VNC server, even when an individual VM is configured to support this configuration. To complete this activity, the firewall has to be modified to allow the appropriate ports.

The below script can be run via the ESXi command line to setup the firewall rules necessary to run VNC. A few items to note:

  • Scripts assumes the firewall rules file is the default provided as by 5.0.0 update 2 build 914586 and/or 5.1.0 build 799733 (may work in other versions)
  • In order to persist settings after a reboot, it is necessary to copy the firewall settings to either a specific datastore mapped to the host, or the local persistent storage linked under the /store directory. Further, the either the /etc/rc.local (ESXi 5.0) or `/etc/rc.local
floer32 /
Last active Sep 26, 2022
recursively convert nested dicts to nested namedtuples, giving you something like immutable object literals
from UserDict import IterableUserDict
import collections
__author__ = ''
def tupperware(mapping):
""" Convert mappings to 'tupperwares' recursively.
View martini-mgo.go
package main
import (
type Wish struct {
kimus /
Last active Jan 6, 2023
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.


Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need:

jonaslejon / Mailgun PHP API with curl
Last active Jul 31, 2021
Send mail with Mailgun API version 2 and PHP. Should also work with version 3 of the Mailgun API
View Mailgun PHP API with curl
define("DOMAIN", "");
define("MAILGUN_API", "XXX123"); // Mailgun Private API Key
function br2nl($string) {
return preg_replace('/\<br(\s*)?\/?\>/i', "\n", $string);
function mg_send($to, $subject, $message) {
$ch = curl_init();