Skip to content

Instantly share code, notes, and snippets.

Working from home

Daniel Huckstep darkhelmet

Working from home
Block or report user

Report or block darkhelmet

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
darkhelmet /
Last active May 23, 2018 — forked from minrk/
bootstrap single node kubernetes with minikube (no vm)
set -x
# apt -y update
# apt -y dist-upgrade
# apt -y install
which minikube || (curl -Lo minikube && chmod +x minikube && mv minikube /usr/local/bin/)
which kubectl || (curl -Lo kubectl$(curl -s && chmod +x kubectl && mv kubectl /usr/local/bin/)
which helm || (curl -Lo helm.tar.gz && tar -xzf helm.tar.gz && mv linux-amd64/helm /usr/local/bin/)
View gist:1de2b726e87be1a7a671
<style type="text/css">
#watermark {
color: #d0d0d0;
font-size: 200pt;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
position: absolute;
width: 100%;
View active_admin.rb
# if you want to monkey patch every controller, put this in initializers/active_admin.rb
ActiveAdmin::ResourceController.class_eval do
include ActiveAdmin::CSVStream
darkhelmet /
Created Mar 4, 2014 — forked from dysinger/
Using docker to build deb of ruby so you don't need to use rvm or something on the server
cat > Dockerfile <<\EOF
FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y ruby1.9.3 build-essential \
libc6-dev libffi-dev libgdbm-dev libncurses5-dev \
libreadline-dev libssl-dev libyaml-dev zlib1g-dev
RUN gem install fpm --bindir=/usr/bin --no-rdoc --no-ri
RUN apt-get install -y curl
RUN curl|tar oxzC /tmp
WORKDIR /tmp/ruby-1.9.3-p484
darkhelmet /
Created Feb 15, 2014 — forked from elithrar/
WAL-E + Postgres 9.x (single server + DB) Setup and Recovery

A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E

  • WAL-E:
  • Assuming Ubuntu 12.04 LTS ("Precise")
  • We'll be using S3. Make sure you have an IAM in a group with GetObject, ListBucket and PutObject on the bucket you want to use (and that it's not public).


  1. These packages:
View spooler.go
// package spooler implements a disk-persistent queue.
// Spooler uses MDB (LMDB) to implement a queue of byteslices. Its intended usecase
// is to enqueue work items received by a service before later working them off.
// Note that Spooler only flushes to disk up to once every 25ms. As a result,
// if the process or machine crashes unexpectedly, the most recent 25ms of work
// can be lost. This decision effectively increases throughput by 10,000%,
// but makes spooler unsuitable for jobs that absolutely cannot be allowed to fail
// under any circumstances.
package spooler
darkhelmet / gist:1163678
Created Aug 22, 2011 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
View gist:1163678
Day job: Polyglot senior developer primarily doing ruby/rails.
Favorite Python project: Probably mercurial, even though I am a git user at heart. Flask is also fantastic.
Favorite Conference: I don't have any conferences under my belt yet :(
Python Experience Level: Just out of the beginner phase into amateur or weekend warrior. Let me get my battle axe...
darkhelmet / heroku.vcl
Created Oct 29, 2010 — forked from adamwiggins/heroku.vcl
Simplified Heroku Varnish config
View heroku.vcl
director routing_mesh round-robin {
.backend = {
.host = "...some ip...";
.port = "...some port...";
.first_byte_timeout = 90s;
.between_bytes_timeout = 90s;
# ...more backends...
View application.rb
# Add this line to your config/application.rb to enable
# initialization of Ripple, after the other framework railties
require 'ripple/railtie'
# To use the Riak cache store, place this line inside the
# Application class
config.cache_store = :riak_store
View gist:641737
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
# 16 workers and 1 master
worker_processes (rails_env == 'production' ? 16 : 4)
# Load rails+github.git into the master before forking workers
# for super-fast worker spawn times
preload_app true
You can’t perform that action at this time.