View gist:dfc545148398d81715da02f61bf39b91
#!/bin/bash
POST_INIT_SYNC_DELAY=60
POLL_DELAY=60
STALL_THRESHOLD=5
if [ -z `pidof btcd` ]; then
echo "Starting btcd"
nohup btcd &
sleep $POST_INIT_SYNC_DELAY
View gist:5d756895ccdcd1b9ef9eb27285386794
alias puppet-run-local='puppet apply -t --modulepath=.. -e "include $(basename $(pwd))"'
View install-foreman.sh
#!/bin/bash -x
set -e
apt-get -y install ca-certificates
wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
dpkg -i puppetlabs-release-trusty.deb
echo "deb http://deb.theforeman.org/ trusty 1.9" > /etc/apt/sources.list.d/foreman.list
echo "deb http://deb.theforeman.org/ plugins 1.9" >> /etc/apt/sources.list.d/foreman.list
View test.sh
#!/bin/bash
function displayPendingTasks() {
echo "The following machines are still running"
declare -A running
for i in ${!RUNNING_TASKS[@]}; do
if kill -0 $i > /dev/null 2>&1; then
echo "PID: $i Machine: ${RUNNING_TASKS[$i]}"
View EasyMockSupport2.java
package org.github.jleskovar;
import org.easymock.Mock;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Stream;