Skip to content

Instantly share code, notes, and snippets.

View mfansler's full-sized avatar
⚙️

Mervin Fansler mfansler

⚙️
View GitHub Profile
.offsetX (@index) when (@index > 0) {
(~".offset@{index}") { .offset(@index); }
.offsetX(@index - 1);
}
.offsetX (0) {}
.offsetX (12);
@mfansler
mfansler / fiddle.response.html
Created September 5, 2012 18:20
jsfiddle ajax
<h1>First</h1>
<p>Salvia pop-up synth raw denim lomo kogi. Food truck viral ethical, lo-fi skateboard swag mumblecore PBR chillwave trust fund scenester. Vegan swag fanny pack aesthetic. High life hella messenger bag sustainable. Sriracha whatever flexitarian farm-to-table raw denim, brooklyn godard messenger bag fixie keffiyeh occupy lomo. Lo-fi dreamcatcher mumblecore fingerstache, aesthetic 8-bit craft beer ethical DIY. Swag pop-up ennui vinyl, next level letterpress tumblr fixie dreamcatcher forage marfa.</p>
<h1>Second</h1>
<p>Polaroid craft beer stumptown, ethical lo-fi jean shorts squid pickled. Squid beard pinterest gluten-free tofu, marfa organic whatever photo booth. Letterpress kogi williamsburg you probably haven't heard of them. Cred seitan pitchfork brunch, hella american apparel synth portland flexitarian you probably haven't heard of them. Fanny pack vice umami VHS. Raw denim mixtape craft beer banh mi four loko, mustache irony PBR banksy whatever lomo lo-fi. Art party photo booth shoreditch keffiyeh.</p>
@mfansler
mfansler / fiddle.response.html
Created October 6, 2012 00:57
Friends List (JSFiddle AJAX)
<h1>Friends</h1>
<ul>
<li>Franz</li>
<li>Gertrude</li>
<li>Henrietta</li>
<li>Isaac</li>
<li>Jicama</li>
</ul>
@mfansler
mfansler / fiddle.response.html
Created October 6, 2012 01:01
Pending requests (JSFiddle AJAX)
<h1>Requests</h1>
<p>You don't have any requests. Either you're really on top of things, or you seriously need to get out more!</p>
@mfansler
mfansler / fiddle.response.html
Created October 6, 2012 00:53
List of contacts (JSFiddle AJAX)
<h1>Contacts</h1>
<ul>
<li>Alize</li>
<li>Bertrand</li>
<li>Cadence</li>
<li>Dominic</li>
<li>Eluvia</li>
</ul>
@mfansler
mfansler / index.html
Created November 14, 2012 18:19
Bootstrap 2.2.1 + FontAwesome Starter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@mfansler
mfansler / SampleInstrument.scala
Created July 1, 2013 20:01
This demos how to use an arbitrary .wav file as the instrument in java.sound.midi Synthesizer.
import javax.sound.midi._
import com.sun.media.sound.AudioFileSoundbankReader
object SampleInstrument extends App {
// AudioFileSoundbankReader allows an individual .wav file to be interpreted as an instrument
val sbr = new AudioFileSoundbankReader();
val sb =
sbr.getSoundbank(new java.io.File("./resources/bassoon-g4.wav"))
//sbr.getSoundbank(new java.io.File("./resources/sin256.wav"))
@mfansler
mfansler / test.mantel.R
Created January 11, 2018 00:46
Implements Mantel's chi-square test for ordinal categorical data
test.mantel <- function (counts, rowScores = NULL, colScores = NULL) {
## This implements an ordinal chi-square test following Mantel, 1963,
## as described in Agresti, 2007, section 2.5.1 "Linear Trend Alternative to
## Independence"
METHOD <- "Mantel's Ordinal Chi-Square Test"
DNAME = deparse(substitute(counts))
n = sum(counts) # total obs
if (n < 30)
@mfansler
mfansler / removeGENCODEmRNA_end_NF.sh
Created April 20, 2019 21:54
Remove GENCODE transcripts missing 3' ends
gzip -cd gencode.vM19.annotation.gtf.gz |
awk '$0 !~ /mRNA_end_NF/' |
sort -k1,1 -k4,4n |
bgzip -@4 > gencode.vM19.mRNA_end_found.gtf.gz
tabix gencode.vM19.mRNA_end_found.gtf.gz