Skip to content

Instantly share code, notes, and snippets.


Barney Hanlon shrikeh

View GitHub Profile
shrikeh / Vagrantfile.example
Last active Jun 5, 2017
CentOS 6 Python bootstrap, necessary for Packer and Vagrant if you wish to provision with Python-based provisioners such as Ansible
View Vagrantfile.example
# Add this to your Provisioning somewhere.
$bootstrap_script = ''
# CentOS 6.8 doesn't come with Python 2.7, so we need to tweak this
config.vm.provision 'bootstrap',
type: 'shell',
path: $bootstrap_script
View Dockerfile
FROM php:7.0.10-cli
COPY ./demo /demo
CMD 'echo Application demo container'
shrikeh / brew.yml
Created Sep 1, 2014
Test ansible mainfiest for brew
View brew.yml
- openssl
- ant
- curl
- wget
- bash
- zsh
- heroku-toolbelt
- zsh-completions

Keybase proof

I hereby claim:

  • I am shrikeh on github.
  • I am shrikeh ( on keybase.
  • I have a public key whose fingerprint is 04D6 A374 5B14 B775 5937 BF40 FAE3 8D23 DC0F 6A4A

To claim this, I am signing this object:

View test.php
class Foo extends \FilterIterator
public function accept()
return true;
View ListIterator.php
namespace TabletopWargaming\ValueObject\Army\ArmyList;
use \FilterIterator;
use \Iterator;
use \TabletopWargaming\ValueObject\Army\ArmyList;
class ListIterator extends FilterIterator
View gist:7985413
- name: Setup a new instance
hosts: webservers
connection: local
user: root
gather_facts: false
- name: Ensure the ssh key for root is setup
digital_ocean: >
shrikeh / nginx-handrolled-lua-spdy-pagespeed
Last active Jan 17, 2019
Set up nginx with Lua, Pagespeed, et al.
View nginx-handrolled-lua-spdy-pagespeed
# Ubuntu instructions
# Get the pre-reqs for this (Ubuntu)
sudo apt-get install git-core build-essential zlib1g-dev libpcre3 libpcre3-dev redis-server libssl-dev libgeoip-dev libgoogle-perftools-dev geoip-database lua5.1 liblua5.1-0 liblua5.1-0-dev lua-iconv-dev libghc-iconv-dev luarocks libpcre3-dev libghc-zlib-bindings-dev
# For Centos:
sudo yum install wget
shrikeh / csrf-lua.conf
Created Feb 6, 2013
A simple nginx host file that, using the lua module, handles CSRF, rather than the backend having to (and thus generally breaking caching by having to use Set-Cookie). Here, the front end takes care of CSRF, and sends an X-CSRF-Valid header to the backend regarding the validity of the POST, so that it is advisory (the backend then choose whether…
View csrf-lua.conf
server {
listen 80;
root /root/to/your/docroot;
proxy_redirect off;
proxy_intercept_errors on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;