Instantly share code, notes, and snippets.

Logan Cox lo5an

View GitHub Profile
# install dependencies and build vbox guest addtions
# doesn't work until rebooted with new kernel
sudo yum install -y gcc kernel-devel bzip2
cd /opt/VBoxGuestAdditions-5.0.16/src/vboxguest-5.0.16/
make install
sudo make install
import json
import csv
with open("authors.json") as authors_json, open("authors.csv", "w+") as authors_csv:
authordata = json.load(authors_json)
authorwriter = csv.writer(authors_csv, delimiter=',',
quotechar='"', quoting=csv.QUOTE_ALL)
for authoruri, value in authordata.items():
row.append(authoruri[26:-5]) # id from uri
%matplotlib inline
import numpy
import matplotlib.pyplot
data = numpy.loadtxt(fname="inflammation-01.csv", delimiter=',')
fig = matplotlib.pyplot.figure(figsize=(10.0, 3.0))
lo5an / hosts
Last active Jan 27, 2016
vagrant stuff to run ansible playbooks against
View hosts
default ansible_ssh_host=drupal.vm.test ansible_ssh_user=vagrant ansible_ssh_private_key_file=.vagrant/machines/default/virtualbox/private_key
lo5an /
Last active Jan 26, 2016
bashrc snippet to colorize less.
# use pygments to colorize less output
# requires pygments, obviously
if which $PYGMENTS_FILTER > /dev/null ; then
LESSPIPE="`which $PYGMENTS_FILTER` -f terminal"
export LESSOPEN="| ${LESSPIPE} %s"
export LESS='-R'
1>&2 printf "\n $@ \n\n"
1>&2 read -p "Are you sure that you're not being dumb? (y/n)" CONFIRM
if [ "$CONFIRM" == "y" ]
/usr/bin/sudo "$@"
View sudo
echo ""
echo " $* "
echo ""
read -p "Are you sure that you're not being dumb? (y/n)" $CONFIRM
if [ "$CONFIRM" == "y" ]
lo5an / Vagrantfile
Last active Aug 29, 2015
~/vagrant.d/Vagrantfile to add package caching and dns for all vms
View Vagrantfile
Vagrant.configure(2) do |config|
# configure a private network so that we can use NFS with caching "private_network", type: "dhcp"
if Vagrant.has_plugin?("vagrant-cachier")
# Configure cached packages to be shared between instances of the same base box.
# More info on
config.cache.scope = :box
View libraries.make
; This file was auto-generated by drush make
core = 7.x
api = 2
projects[drupal][version] = "7.34"
; Modules
projects[addressfield][version] = "1.0-beta5"
projects[admin_menu][version] = "3.0-rc4"

Keybase proof

I hereby claim:

  • I am lo5an on github.
  • I am lo5an ( on keybase.
  • I have a public key whose fingerprint is 0D39 1707 EE6C A97C B8AF 6831 4899 5631 7AD4 E3F8

To claim this, I am signing this object: