Skip to content

Instantly share code, notes, and snippets.

View lukeorland's full-sized avatar

Luke Orland lukeorland

View GitHub Profile
@lukeorland
lukeorland / project.clj
Created November 23, 2015 13:19
clojure spacemacs repl nrepl plugins
:plugins [[refactor-nrepl "2.0.0-SNAPSHOT"]
[cider/cider-nrepl "0.10.0-SNAPSHOT"]]
#!/usr/bin/env python
"""
Graph the DAG of tasks
Modified from https://gist.github.com/BrianHicks/2769821
"""
import argparse
import json
import logging
#!/usr/bin/env perl
# References:
# - http://stackoverflow.com/a/800105/492631
use warnings;
use strict;
# fork processes
my $num_cores = 4;
my @children = ();
#!/usr/bin/env python
import time
from fabric.api import *
def two_secs():
t = time.time()
time.sleep(2)
return t
---
- hosts: 127.0.0.1
connection: local
tasks:
- name: Remove file 0
file: name=/tmp/mycoolfile state=absent
- name: Touch file with async, dictionary syntax
command: touch mycoolfile
lorland at Lukes-Neverware-mba in ~/workspace/peptalk (symlink-hardcoded-Juicebox-code-path●)
$ time ansible-playbook -i hosts site.yml -l rc_fresh1 -vvvv
PLAY [Configure and deploy the CentOS 6.5 Juiceboxes and application code] ****
GATHERING FACTS ***************************************************************
<172.16.29.89> ESTABLISH CONNECTION FOR USER: root
<172.16.29.89> REMOTE_MODULE setup
<172.16.29.89> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/lorland/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=root', '-o', 'ConnectTimeout=10', '172.16.29.89', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1414864230.27-222877363691008 && echo $HOME/.ansible/tmp/ansible-tmp-1414864230.27-222877363691008'"]
<172.16.29.89> PUT /var/folders/7l/7lc870xx2wn_m2pv29mg9d100000gn/T/tm
2014-11-01 19:23:01.167+0000: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name instance1.0-1 -S -M rhel6.6.0 -cpu SandyBridge,+invtsc,+erms,+smep,+fsgsbase,+pdpe1gb,+rdrand,+f16c,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 971806c0-63ed-8dc3-ce07-25788aaaedbe -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance1.0-1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -no-shutdown -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0
2014-11-01 19:22:54,843 INFO
VmPool.py._recycle_next: 85
VmPool Recycle Queue: creating instance 1
2014-11-01 19:22:54,844 INFO
VmPool.py._create: 319
VmPool: creating instance 1: engaging VmMaster.lock()
2014-11-01 19:22:54,846 INFO
VmInstance.py.create: 225
#!/bin/bash
#---------------------------------------#
# Python 2.7.3 Install on CentOS 5 #
# https://gist.github.com/timss/5122008 #
# #
# Installs to /usr/local/{bin,lib} #
# Seperate from system default #
# /usr/bin/python(2.4) #
#---------------------------------------#
@lukeorland
lukeorland / test_nose2_unittest_layers.py
Last active August 29, 2015 14:04
When I was looking into this issue: https://github.com/nose-devs/nose2/issues/215 I discovered some naming/behavior inconsistency between the "classmethod setUp", "setUp", and "classmethod setUpClass"
"""
run with:
nose2 test_nose2_unittest_layers --plugin nose2.plugins.layers --layer-reporter --verbose
"""
import time
import unittest
class Layer1(object):