Skip to content

Instantly share code, notes, and snippets.

View phumpal's full-sized avatar
🌮

Patrick Humpal phumpal

🌮
  • Northern California
View GitHub Profile
@phumpal
phumpal / README.md
Last active August 11, 2018 04:36
Devin's WormDeath processor

WormDeath Processor

WormDeath Processor is a simple and not so idiomatic Python script to process strain worm deaths over a given number of days.

The number of days and strains can be dynamic but the script ignores days where there were 0 worm deaths and outputs a two column CSV with the strains processed in series.

Usage

  • -i or --input input CSV
  • -o or --output output CSV
@phumpal
phumpal / Vagrantfile
Created March 17, 2018 07:14
jruby-1.7.4, toadhopper-2.1, openjdk-6-jdk, precise64, openSSL (1.0.1 14 Mar 2012)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
@phumpal
phumpal / s3_wale_policy.json
Created July 21, 2017 19:25
wal-e encrypted PostgreSQL backups s3 policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3PostgreSQLWALeBackups",
"Action": [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:DeleteObjectVersion",
"s3:GetObject",

Keybase proof

I hereby claim:

  • I am phumpal on github.
  • I am phumpal (https://keybase.io/phumpal) on keybase.
  • I have a public key whose fingerprint is F949 FD0F EB0A EAFE D01B 3349 233C 59EA 6342 D3F9

To claim this, I am signing this object:

@phumpal
phumpal / remove_ruby.sh
Created February 3, 2016 23:11
A shit script to remove Ruby installed from source
#!/bin/bash
gem list | grep -v "test-unit|rdoc|psych|io-console|minitest|rake|bigdecimal|json" | cut -d" " -f1 | xargs gem uninstall -aIx
rm -rf /usr/local/lib/ruby
rm -rf /usr/local/share/doc/ruby
rm -rf /usr/local/share/ri
rm -rf /usr/local/include/ruby-*
rm -rf /usr/local/bin/ruby
#!/bin/bash
set -e
sudo apt-get install librealine-dev libssl-dev libncurses5-dev -y
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
@phumpal
phumpal / robots.txt
Last active December 20, 2015 06:59
Magento robots.txt template
# Google Image Crawler Setup
User-agent: Googlebot-Image
Disallow:
# Crawlers Setup
User-agent: *
# Directories
Disallow: /404/
Disallow: /app/
@phumpal
phumpal / Vagrantfile
Created July 11, 2013 23:22
Simple Vagrant file for vmware_fusion provider
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "gtl"
config.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
config.vm.network :public_network
@phumpal
phumpal / 1hosts
Last active December 17, 2015 04:38
When pyyaml.org is down my VM builds containing @rvm #fail. I have a VM running a barebones Nginx on 192.168.1.214
/private/etc/hosts
192.168.1.214 pyyaml.org
@phumpal
phumpal / sensu-client.conf
Last active October 21, 2015 20:34
This is a simple upstart config for sensu-client
description "sensu-client"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
chdir /opt/sensu
pre-start script