Skip to content

Instantly share code, notes, and snippets.

View davemkirk's full-sized avatar

David Kirk davemkirk

View GitHub Profile
function coreos-image {
REGION=$1
CHANNEL=${2:-stable}
EXPRESSION=`printf '.amis|map(select(.name == "%s"))[0]["hvm"]' "$REGION"`
curl --fail -s -L http://$CHANNEL.release.core-os.net/amd64-usr/current/coreos_production_ami_all.json | jq -r "$EXPRESSION"
}
@davemkirk
davemkirk / Vagrantfile
Created April 4, 2015 20:23
Jupyter (aka IPython Notebook) Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
@davemkirk
davemkirk / DockerFile
Created May 31, 2014 02:45
2048 Dockerfile
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y nginx zip curl
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN curl -o /usr/share/nginx/www/master.zip -L https://codeload.github.com/gabrielecirulli/2048/zip/master
RUN cd /usr/share/nginx/www/ && unzip master.zip && mv 2048-master/* . && rm -rf 2048-master master.zip
EXPOSE 80
@davemkirk
davemkirk / wpt_server_setup.sh
Last active February 7, 2017 00:14
WebPageTest Server Setup - Ubuntu 12.04 LTS
#!/bin/bash
apt-get update -y
apt-get install apache2 -y
apt-get install php5 libapache2-mod-php5 -y
/etc/init.d/apache2 restart
apt-get install php5-gd -y
apt-get install php5-curl -y