Skip to content

Instantly share code, notes, and snippets.

View mheiges's full-sized avatar

Mark Heiges mheiges

View GitHub Profile
@mheiges
mheiges / sample.org.conf
Last active September 26, 2015 06:48
sample Apache HTTP Server virtual host configuration for EuPathDB franchises
#### required MACRO Substitutions #######
# %SERVERNAME% - server host name, e.g. adhemar.schistodb.org
# manually add a ServerAlias if needed, e.g. www.shistodb.org
# %WEBAPP% - name of Tomcat webapp. e.g. schisto.adhemar
# %PROJECT% - project name, e.g. SchistoDB
# %ADMIN_EMAIL% - administrative email for server, e.g. root@schistodb.org
# %TC_PORT% - Tomcat HTTP port
# %ORACLE_HOME% - same as $ORACLE_HOME
# %LD_LIBRARY_PATH% - $ORACLE_HOME/lib plus any other paths as appropriate
##########################################
@mheiges
mheiges / RPM-GPG-KEY-EUPATHDB
Created July 6, 2011 17:20
Key for EuPathDB yum repository. Save as /etc/pki/rpm-gpg/RPM-GPG-KEY-EUPATHDB
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBEvoisoRBACwieYGolrR3rH0BhOcLa9vX+VintZ0gA0PxTGVzS+cntNGN+6f
fOaa+DnIQvxjrAg2FyBrOO4aQeW2Uo/A0ZXHIFZh7tSW4k0AfFQkSli/D4aNej7D
+S9Gp6/wt9NcHKj9Q67pduH7+P8x7RZbfjoeb/KHgTEKQAMV83e0lqcdNwCgraBx
FGH13CsBYtoVlYNmFidnIYED/jHMSxFdIqwthGxhl6M6lnJKB6+6DL2sdywZ5c9z
7FFHQRKKY5HvRGqFIIRtI9rccrRzifFx5NzZWf+osAS0+IFvFpd/Ko5/LKI5siWN
cqFg4PGUmAW7/WIhE9kdwb86liw//qlLIgYf5+vgQpVS4IbCReRMo2Wkq78OoixT
34qcA/0bOjA/e1N2mWQh6oILmQtqx9G87yvseT4d4YCA8UlbEfWcGiepw1GtHUgF
@mheiges
mheiges / .bashrc
Created July 15, 2011 01:23
rcluster bashrc
if [ -z "$PS1" ]; then
# non-interactive shell
export LSB_DEFAULTPROJECT="810086221_jcklab__10-21-RR374-062"
fi
. /iob_home/jcklab/.bashrc.rcluster
@mheiges
mheiges / apidb-tab-completion.sh
Created July 27, 2011 20:34
/etc/profile.d/apidb-tab-completion.sh
#
# bash tab completion functions and assignments for the ApiDB project
#
# $Id: apidb-tab-completion.sh 1314 2009-11-12 22:49:57Z mheiges $
_instance_manager() {
COMPREPLY=()
local verbs="manage start stop restart status"
local man_tasks="start stop reload redeploy undeploy list deploy"
10378 ? S 0:00 \_ /usr/bin/perl /iob_home/jcklab/mheiges/GUS/gus_home/bin/nodeSocketServer.pl rcluster 7901
10380 ? S 0:00 \_ bash -s
10640 ? S 0:00 \_ /bin/sh /iob_home/jcklab/mheiges/GUS/gus_home/bin/subtaskInvoker /tmp/170544.1.mri-q64-30d/slot_2 /iob_home/jcklab/mheiges/GUS/gus_home/test/DJob/master/running/subtask_9/result 170544 rcluster 7901 samplecmd /tmp/170544.1.mri-q64-30d/slot_2/inputset hello
10642 ? S 0:00 | \_ /usr/bin/perl /iob_home/jcklab/mheiges/GUS/gus_home/bin/samplecmd /tmp/170544.1.mri-q64-30d/slot_2/inputset hello
10649 ? S 0:00 \_ /bin/sh /iob_home/jcklab/mheiges/GUS/gus_home/bin/subtaskInvoker /tmp/170544.1.mri-q64-30d/slot_4 /iob_home/jcklab/mheiges/GUS/gus_home/test/DJob/master/running/subtask_10/result 170544 rcluster 7901 samplecmd /tmp/170544.1.mri-q64-30d/slot_4/inputset hello
10650 ? S 0:00 | \_ /usr/bin/perl /iob_home/jcklab/mheiges/GUS/gus_home/bin/samplecmd /
@mheiges
mheiges / gist:2286418
Created April 2, 2012 19:09
Groovy build step for puppet-client-manager
/* Groovy script for Jenkins' puppet-client-manager job
to trigger downstream execution of puppet clients.
https://ci.apidb.org/job/puppet-client-manager
*/
import hudson.model.*
import hudson.FilePath
import hudson.FilePath.FileCallable
import hudson.remoting.VirtualChannel
import java.io.OutputStream
@mheiges
mheiges / isjobfailed
Created May 2, 2012 15:50
Groovy script to skip build if other job is failed
/**
Checks the last build status of a sentinel job and if worse than expected,
aborts the job running this script.
Example usage. Use this script in a pre-scm build step (using pre-scm plugin) for
qa.eupathdb.org . Configure the qa.eupathdb.org job to use the integrate.eupathdb.org
job as a sentinel_job. If the last build of integrate.eupathdb.org is worse than
expected when a qa.eupathdb.org build is started then abort the qa.eupathdb.org
build so it doesn't pick up the bad code that failed the sentinel job.
@mheiges
mheiges / make_admin_bin.sh
Last active August 29, 2015 14:04
Link executables into $admin_path/bin/ for cluster/workflow software management
#!/bin/sh
set -u -e
admin_path=$1;
if [ -d "$admin_path/bin" ]; then
mv "$admin_path/bin" "$admin_path/bin.bak"
fi
mkdir "$admin_path/bin"
@mheiges
mheiges / downloadOracleJdk
Created June 3, 2015 19:38
Download Oracle JDK RPM files
#!/usr/bin/perl
# Scrape Oracle JDK web pages for RPM links. Download those RPM files.
# Deletes downloaded files that do not pass rpm checksum (e.g. incomplete downloads).
# Skips downloading files already on the local filesystem.
use strict;
use sigtrap qw(handler exit_handler normal-signals error-signals);
@mheiges
mheiges / workflow-software-sysadmin-init.sh
Last active March 28, 2018 15:56
Install sysadmin environment for EuPathDB BRC workflow software
#!/bin/sh
set -e
# Usage: workflow-software-sysadmin-init.sh [/path/to/workflow-software]
# were [/path/to/workflow-software] is where to install the sysadmin
# directory. Defaults to $HOME.
#
# This script nitializes and bootstraps the `${wfs_dir}/sysadmin`
# directory with required infrastructure. The end result is an
# environment where the workpuppet script can be run to maintain