Skip to content

Instantly share code, notes, and snippets.

Patrick Humpal phumpal

Block or report user

Report or block phumpal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
phumpal / .htaccess
Created Jan 22, 2019
Heroku force ssl
View .htaccess
##Force SSL
#Normal way (in case you need to deploy to NON-heroku)
RewriteCond %{HTTPS} !=on
#Heroku way
RewriteCond %{HTTP:X-Forwarded-Proto} !https
#If neither above conditions are met, redirect to https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
phumpal /
Last active Aug 11, 2018
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.


  • -i or --input input CSV
  • -o or --output output CSV
phumpal / Vagrantfile
Created Mar 17, 2018
jruby-1.7.4, toadhopper-2.1, openjdk-6-jdk, precise64, openSSL (1.0.1 14 Mar 2012)
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config| = "precise64" "public_network"
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
phumpal /
Last active Mar 16, 2018
Install CoreOS on Hetzner w/hardware RAID1

CoreOS on Hetzner w/hardware RADI1

The existing docs when attempting to install CoreOS on Hetzner are a bit incomplete. This caused a bit of frustration for me so I am putting this doc together in hopes that it will help someone else.


After ordering your server you will need to log into the Hetzner server console

Add a public key

phumpal / s3_wale_policy.json
Created Jul 21, 2017
wal-e encrypted PostgreSQL backups s3 policy
View s3_wale_policy.json
"Version": "2012-10-17",
"Statement": [
"Sid": "S3PostgreSQLWALeBackups",
"Action": [

Keybase proof

I hereby claim:

  • I am phumpal on github.
  • I am 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 /
Created Feb 3, 2016
A shit script to remove Ruby installed from source
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
set -e
sudo apt-get install librealine-dev libssl-dev libncurses5-dev -y
cd ~/
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 / robots.txt
Last active Dec 20, 2015
Magento robots.txt template
View robots.txt
# Google Image Crawler Setup
User-agent: Googlebot-Image
# Crawlers Setup
User-agent: *
# Directories
Disallow: /404/
Disallow: /app/
phumpal / Vagrantfile
Created Jul 11, 2013
Simple Vagrant file for vmware_fusion provider
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config| = "gtl"
config.vm.box_url = "" :public_network
You can’t perform that action at this time.