Skip to content

Instantly share code, notes, and snippets.

@nachocab
nachocab / instructions.sh
Last active February 13, 2022 15:45
How to make git diff work perfectly with .docx files in Mac OS X (it even colors by word)
# download docx2txt by Sandeep Kumar
wget -O docx2txt.pl http://www.cs.indiana.edu/~kinzler/home/binp/docx2txt
# make a wrapper
echo '#!/bin/bash
docx2txt.pl $1 -' > docx2txt
chmod +x docx2txt
# make sure docx2txt.pl and docx2txt are your current PATH. Here's a guide
http://shapeshed.com/using_custom_shell_scripts_on_osx_or_linux/
@nachocab
nachocab / html.r
Created June 14, 2013 20:32 — forked from hadley/html.r
# We first start by creating a way of escaping the characters that have special
# meaning for html, while making sure we don't end up double-escaping at any
# point. The easiest way to do this is to create an S3 class that allows us to
# distinguish between regular text (that needs escaping) and html (that
# doesn't).
#
# We then write an escape method that leaves html unchanged and escapes the
# special characters (&, <, >) in ordinary text. We also add a method for lists
# for convenience
<!DOCTYPE html>
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style>
body {
font: 10px sans-serif;
}
rect {
@nachocab
nachocab / sequencing.sh
Created May 24, 2013 20:32
Commands used to count reads in the filone and yang_a datasets.
tophat --version
# Tophat v2.0.0
# filone
for LANE in 0 0_5 2 6 18; do
tophat --library-type fr-unstranded \
--solexa1.3-quals \
--segment-length 18 \
--no-coverage-search \
--no-novel-juncs \
@nachocab
nachocab / _.md
Created May 19, 2013 16:33
Tributary inlet
@nachocab
nachocab / _.md
Created May 19, 2013 13:04
crossfilter racetrack
@nachocab
nachocab / _.md
Created May 19, 2013 12:52
Tributary inlet
@nachocab
nachocab / _.md
Created May 19, 2013 12:49
saveable graph layout

An interactive longitudinal heatmap

@nachocab
nachocab / README.md
Last active December 15, 2015 21:39
Worry about correctness and repeatability, not p-values.