Skip to content

Instantly share code, notes, and snippets.

View TomHarrop's full-sized avatar

Tom Harrop TomHarrop

  • Melbourne, Australia
View GitHub Profile
@TomHarrop
TomHarrop / graph.sh
Created August 4, 2020 02:03
Snakemake dag/rulegraph without printing target
#!/usr/bin/env bash
snakemake \
--dag \
--forceall \
| grep -v "^[[:space:]+]0" | grep -v "\->[[:space:]]0" \
| dot -Tsvg \
> graph.svg
@TomHarrop
TomHarrop / run_minknow.md
Last active June 3, 2019 10:21
Run MinKNOW with Singularity in a ubuntu 16.04 instance

Give devices with the ONT vendor id write access.

add the following to /etc/udev/rules.d/ont.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="2a1d", MODE="0666"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="2a1d", MODE="0666"

Reload the rules

sudo udevadm control --reload-rules
#!/usr/bin/env Rscript
library(lubridate)
library(tidyverse)
library(ggplot2)
#############
# FUNCTIONS #
#############
@TomHarrop
TomHarrop / # r - 2017-07-23_20-38-57.txt
Created July 23, 2017 08:55
r on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for r on macOS 10.12.6
Build date: 2017-07-23 20:38:57
# /etc/apt/sources.list.d/private-repo.list
deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/private_repo.gpg] file:/usr/local/mydebs ./
@TomHarrop
TomHarrop / th.Rmd
Last active September 30, 2015 09:20
Use of \renewcommand and \protect to get custom figure caption prefixes and references in Tufte-handout PDF using knitr
---
output:
rmarkdown::tufte_handout:
default
header-includes:
\usepackage{caption}
\captionsetup[figure]{labelfont=bf}
\renewcommand{\thefigure}{S\arabic{figure}}
---
@TomHarrop
TomHarrop / gist:70ca5b94315d9141198b
Created April 26, 2015 15:49
freenas 9.3 forked-daapd install with slightly modified install script from https://github.com/ejurgensen/forked-daapd/blob/master/scripts/freebsd_install_10.1.sh
#!/bin/sh
# Credit thorsteneckel who made the how-to that is the basis for this
# script, see https://gist.github.com/thorsteneckel/c0610fb415c8d0486bce
echo "This script will install forked-daapd in FreeBSD 10.1. The script is not"
echo "very polished, so you might want to look through it before running it."
read -p "Continue? [y/N] " yn
if [ "$yn" != "y" ]; then
exit
fi