Skip to content

Instantly share code, notes, and snippets.

View alanorth's full-sized avatar

Alan Orth alanorth

View GitHub Profile
@alanorth
alanorth / sysctl.conf
Created April 16, 2014 07:47
Linux sysctl.conf additions for security (CIS adjustments) and tweaks
# CIS Benchmark Adjustments
# See: https://github.com/alanorth/securekickstarts
kernel.randomize_va_space = 2
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
@alanorth
alanorth / tasks.yml
Created June 25, 2014 11:33
Deploy Tomcat config and application contexts with Ansible!
- name: Copy Tomcat config(s)
template: src={{ item.src }} dest={{ item.dest }} mode={{ item.mode }} owner=root group=root
with_items:
- { src: 'tomcat/server.xml.j2', dest: '/etc/tomcat7/server.xml', mode: '0644' }
- { src: 'tomcat/tomcat-users.xml.j2', dest: '/etc/tomcat7/tomcat-users.xml', mode: '0640' }
notify:
- restart tomcat7
tags: tomcat
- name: Prepare Tomcat web application contexts
@alanorth
alanorth / gogs-ubuntu-14.04.md
Last active August 29, 2015 14:03
Configuring gogs.io in an Ubuntu 14.04 VM

Gogs.io on Ubuntu 14.04

Create the VM

Create a VM using virt-install and feed it a preseed.

$ sudo virt-install --name gogs --ram 1024 --vcpus=1,cpuset=3 --cpu host --disk path=/home/aorth/software/vms/gogs.qcow2,size=40,bus=virtio,format=qcow2 --bridge=br0 --os-variant ubuntusaucy --location http://ubuntu.mirror.ac.ke/ubuntu/dists/trusty/main/installer-amd64 --graphics vnc -x "auto=true priority=critical url=http://192.168.5.3/~aorth/preseed/gogs.cfg"

You will have to configure the network manually (you can't set the network configuration in the preseed when using a network-based preseed, apparently).

Add users

@alanorth
alanorth / beast.sbatch
Created July 17, 2014 11:35
Batch job to run BEAST
#!/bin/bash
#SBATCH -p batch
#SBATCH -J beast
#SBATCH -n 4
module load beast/1.7.5
DATA_DIR=~/data/beast_runs/
XML=H5N1_HA_NR.xml
@alanorth
alanorth / ray-mpi.sh
Created September 2, 2014 08:38
SLURM batch script to run Ray assembler with MPI on paired-end MiSeq reads.
#!/bin/env bash
#SBATCH -p batch
# will use 15 CPUs
#SBATCH -n 15
# will use 2-3 different nodes
#SBATCH --nodes=2-3
#SBATCH -J ray
module load ray/2.3.1

Keybase proof

I hereby claim:

  • I am alanorth on github.
  • I am alanorth (https://keybase.io/alanorth) on keybase.
  • I have a public key whose fingerprint is 8CB0 D0AC B5CD 81EC 209C 6CDF BD1A 0E09 C2F8 36C0

To claim this, I am signing this object:

@alanorth
alanorth / dspace-4x-xmlui.md
Last active August 29, 2015 14:08
Investigating bringing CGSpace XMLUI themes into the 4.x world

Update XMLUI themes for new DSpace 4.x code / assets

The current CGSpace XMLUI themes are based on XMLUI as it was around DSpace 1.7/1.8, but were slightly update to take advantage of DSpace 3.x features, code, etc. We need to check the contents of current CGSpace XMLUI themes against the latest DSpace 4.x Mirage for new code, assets, best practices, etc.

From a brief look at the code, it seems this could happen in two phases:

  • Phase 1: static, unchanged assets like images and JavaScript which we can copy in verbatim
  • Phase 2: customized layout / display code like CSS and XSL which we have to integrate manually

Phase 1

Image directories:

@alanorth
alanorth / dspace_rest.md
Last active August 29, 2015 14:08
Playing with the DSpace 4.x REST API.

DSpace 4.x REST API

Ok, so this is pretty cool. I played with it a bit more and found some useful tidbits. The documentation for the REST API lists the following endpoints:

  • /communities
  • /collections
  • /items
  • /bitstreams

But I found there is also /handle which is much easier to work with because you don't have to know the internal database ID of a given community / collection / item, etc... you can just work using the same IDs you're used to from the DSpace front end.

DSpace Test has the REST webapp running here: https://cgspace.cgiar.org/rest

@alanorth
alanorth / batchfile.txt
Created November 13, 2014 13:21
Running Mothur on HPC
screen.seqs(fasta=stability.trim.contigs.fasta, group=stability.contigs.groups, maxambig=2, minlength=239, maxlength=260)
@alanorth
alanorth / sd-to-hpc.txt
Created April 13, 2015 07:45
San Diego, California commercial ISP to ILRI, Nairobi HPC
Start: Fri Apr 10 07:47:56 2015
HOST: Alans-MBP Loss% Snt Last Avg Best Wrst StDev
1.|-- homeportal 0.0% 10 2.2 2.5 1.8 4.9 0.8
2.|-- 172-7-164-2.lightspeed.sn 0.0% 10 21.1 21.5 21.0 22.5 0.0
3.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
4.|-- 12.83.70.181 0.0% 10 24.6 24.5 22.1 27.5 1.6
5.|-- ggr2.la2ca.ip.att.net 10.0% 10 28.7 28.5 26.0 35.3 2.8
6.|-- las-bb1-link.telia.net 0.0% 10 25.6 27.4 25.6 31.6 2.1
7.|-- nyk-bb1-link.telia.net 0.0% 10 107.0 103.6 102.9 107.0 1.2
8.|-- prs-bb3-link.telia.net 0.0% 10 186.5 187.8 186.4 193.6 2.0