Skip to content

Instantly share code, notes, and snippets.

Alex Arnell voidlock

Block or report user

Report or block voidlock

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
View snippet.rb
# stolen from ActiveSupport::Concern
module Concern
def self.extended(base)
base.instance_variable_set("@_dependencies", [])
end
def append_features(base)
if base.instance_variable_defined?("@_dependencies")
base.instance_variable_get("@_dependencies") << self
return false
View bravenet-interview.php
<?php
/*************************************/
/* Just little blurb on how things should work
/* 2 types of projects - Working and Coomplete
/* Working -> display normal info
/* Complete -> display badge consisting of
/* final work and rank
/*
/*************************************/
class User {
View file.sc
import cherrypy
class HelloWorld(object):
def index(self):
return "Hello World!"
index.exposed = True
cherrypy.quickstart(HelloWorld()
View info.txt
redis_version:1.3.8
arch_bits:64
multiplexing_api:epoll
process_id:2562
uptime_in_seconds:6124435
uptime_in_days:70
connected_clients:170
connected_slaves:0
blocked_clients:0
used_memory:999551863
@voidlock
voidlock / pre-commit
Created Aug 21, 2013
Git commit hooks. Shove these in your project's `.git/hooks` directory and make them executable.
View pre-commit
#!/usr/bin/env bash
# Runs all executable pre-commit-* hooks and exits after,
# if any of them was not successful.
#
# Based on
# http://osdir.com/ml/git/2009-01/msg00308.html
data=$(cat)
exitcodes=()
View keybase.md

Keybase proof

I hereby claim:

  • I am voidlock on github.
  • I am alexarnell (https://keybase.io/alexarnell) on keybase.
  • I have a public key whose fingerprint is 8615 B97E F682 CA68 1006 1617 523D 3531 7451 C916

To claim this, I am signing this object:

@voidlock
voidlock / docker-vpn-fix.sh
Created Nov 27, 2015
Fixes docker after connection to Cisco VPN
View docker-vpn-fix.sh
#!/bin/sh
for MACHINE in $(docker-machine ls -q --filter "state=Running"); do
sudo route -n add -net $(docker-machine ip $MACHINE | cut -d '.' -f 1,2,3).0/24 -interface $(VBoxManage showvminfo $MACHINE --machinereadable | grep hostonlyadapter | cut -d '"' -f 2)
done
You can’t perform that action at this time.