Skip to content

Instantly share code, notes, and snippets.

View daniellawrence's full-sized avatar
🏠
Working from home

Daniel daniellawrence

🏠
Working from home
View GitHub Profile
#!/bin/bash -e
CONTAINTER_NAME=${1}
# If we are not provided a name to use, then use the name of
# the current directory
if [[ -z ${CONTAINTER_NAME} ]];then
CONTAINER_NAME=${PWD##*/}
fi
CONTAINER_VERSION=${2}
@daniellawrence
daniellawrence / tasks.py
Created October 17, 2013 10:54
Queuing fabric tasks and stream reading output using celery & redis - A little bit of evil with tempfiles and stdout redirection.
# RUN ME, I am the worker!
# $ pip install fabric celery-with-redis
# $ celery -A tasks worker -E --loglevel=debug
from celery import Celery
from time import sleep
from fabric.api import env, run, execute
import sys
celery = Celery('tasks', broker='redis://', backend='redis://')
@daniellawrence
daniellawrence / gist:6567637
Created September 15, 2013 02:48
Installing puppetmaster on docker container 'ubuntu'
echo "deb http://au.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
echo "deb-src http://au.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
apt-get install wget
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
dpkg -i puppetlabs-release-precise.deb
apt-get update
apt-get install puppetmaster
@daniellawrence
daniellawrence / gist:6070962
Last active December 20, 2015 04:28
Python wheel

Requirements (new pip and wheel)

$ pip install -U pip
$ pip install -U wheel

Testing ( you have pip 1.4 )

@daniellawrence
daniellawrence / install-graphite.sh
Created October 24, 2012 14:03
Installing graphite on a fresh ubuntu server.
#!/bin/bash
################################################################################
# Quick script to get graphite up and going on a freshly installed ubuntu server
# Don't use this in production, this for purely for testing and play boxes.
# Written by: Daniel@danielscottlawrence.com
################################################################################
GRAPHITE_URL="https://github.com/graphite-project/graphite-web/zipball/master"
GRAPHITE_ZIP="graphite-web-latest.zip"