Skip to content

Instantly share code, notes, and snippets.

@fwip
fwip / Test Public Gist
Created April 18, 2011 17:35
Try out public Gist.
Here is some text that I have typed in the body.
I wonder if this also supports _GML_...
Looks like it is meant mainly for code.
Another change, for the sake of change.
@fwip
fwip / badthingshappen.dec
Created May 13, 2012 02:35
Torpor Orb = allstar
* Artifacts
4 Torpor Orb
2 Mimic Vat
* Creatures
4 Vexing Devil
4 Treacherous Pit-Dweller
4 Demonlord of Ashmouth
* Spells and shit
@fwip
fwip / 4d6drop.rb
Created December 12, 2012 17:20
Example script that calculates the probability of getting each score in a "roll 4 six sided dice, drop the lowest, then sum" scheme.
#!/usr/local/bin/ruby
# Calculates the distribution of 4d6, drop lowest
scores = {}
(1..6).each do |i|
(1..6).each do |j|
(1..6).each do |k|
(1..6).each do |l|
dice = [i, j, k, l].sort
dice.shift
#!/bin/sh
# ================================================================
#
# Convert a mysql database dump into something sqlite3 understands.
#
# Adapted from
# http://stackoverflow.com/questions/489277/script-to-convert-mysql-dump-sql-file-into-format-that-can-be-imported-into-sqlit
#
# (c) 2010 Martin Czygan <martin.czygan@gmail.com>
#!/usr/bin/perl
# Original version at: http://stackoverflow.com/a/9857906
#===============================================================================
# USAGE: ./mysql2sqlite.pl <MySQL_dumpfile>
# DESCRIPTION: Converts MySQL dumpfile to SQLite database
# Triggers are not converted
# The dump must be done with
# > mysqldump --skip-triggers -u [user] --p [database] > dumpfile
# REQUIREMENTS: Perl and module SQL::Translator, SQLite
#===============================================================================
package main
import (
"fmt"
"compress/gzip"
"os"
"encoding/binary"
"flag"
"sort"
)

Keybase proof

I hereby claim:

  • I am fwip on github.
  • I am fwip (https://keybase.io/fwip) on keybase.
  • I have a public key whose fingerprint is A8F2 94DE 9A9E AB65 2794 BD52 A7A0 4A6F 4C13 4C24

To claim this, I am signing this object:

read -d '' unaligned_command << _U_
bcl2fastq \\\\
--input-dir "${illumina_dir}/Data/Intensities/BaseCalls" \\\\
--use-bases-mask "$mask" \\\\
--output-dir "$fastq_dir" \\\\
--with-failed-reads \\\\
--barcode-mismatches "$mismatches" \\\\
--loading-threads \\\$(( NSLOTS / 4 + 1 )) \\\\
--writing-threads \\\$(( NSLOTS / 4 + 1 )) \\\\
--demultiplexing-threads \\\$(( NSLOTS / 2 + 1 )) \\\\
qsub -cwd -N "u-H3MHT" -pe threads 8 -V -S /bin/bash <<'__FASTQ__'
set -x -e -o pipefail
cd "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX"
bcl2fastq \
--input-dir "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX/Data/Intensities/BaseCalls" \
--use-bases-mask "y36,I6n,y36" \
--output-dir "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX/fastq" \
#!/bin/bash
username="MYUSERNAME"
origPort="80"
midlPort="38080"
destPort="80"
midlHost="MYMIDDLEMAN"
destHost="MYDESTINATION"