Skip to content

Instantly share code, notes, and snippets.

@withakay
withakay / bjorklund.js
Created October 14, 2011 10:10
Bjorklund algorithm in JavaScript
/*
An implementation of the Bjorklund algorithm in JavaScript
Inspired by the paper 'The Euclidean Algorithm Generates Traditional Musical Rhythms'
by Godfried Toussaint

This is a port of the original algorithm by E. Bjorklund which I
found in the paper 'The Theory of Rep-Rate Pattern Generation in the SNS Timing Systems' by
E. Bjorklund.
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@fjolnir
fjolnir / tlc.lua
Last active February 15, 2024 15:01
LuaJIT ObjC bridge
The bridge is now located at https://github.com/fjolnir/TLC
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 3, 2024 12:57
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@miyagawa
miyagawa / circular-detect.pl
Last active November 2, 2021 15:33
Circular perl/CPAN dependencies with requires/recommends/suggests for configure/runtime/build/test for all modules in 02packages
#!/usr/bin/env perl
use strict;
use Parse::CPAN::Packages;
use Module::CoreList;
use JSON::XS;
$| = 1;
my $packages_file = "$ENV{HOME}/minicpan/modules/02packages.details.txt.gz";
@iGEL
iGEL / .Xresources
Last active August 31, 2020 11:26
Xft.dpi: 96
URxvt.font: xft:DejaVu\ Sans\ Mono:size=11
URxvt.scrollBar: off
URxvt.saveLines: 4096
URxvt.perl-ext-common: default,url-select,keyboard-select,font-size,clipboard
URxvt.urlLauncher: xdg-open
__BEGIN__
*vimtips.txt* For Vim version 7.3.
------------------------------------------------------------------------------
" new items marked [N] , corrected items marked [C]
" *best-searching*
/joe/e : cursor set to End of match
3/joe/e+1 : find 3rd joe cursor set to End of match plus 1 [C]
/joe/s-2 : cursor set to Start of match minus 2
/joe/+3 : find joe move cursor 3 lines down
/^joe.*fred.*bill/ : find joe AND fred AND Bill (Joe at start of line)
@robmiller
robmiller / gist:214b3adf820b41a847c2
Last active August 7, 2022 18:53
Text processing tutorial: splitting files, rows to columns, line endings

For this tutorial, we have the following brief. That is: to take a file that contains many millions of lines of text, each one of them a single column — something that looks like this:

POPLKLMNE
GKITLOPOM
QASSLKOPI
== snip ==

...into multiple text files, each with a fixed number of lines in them, each with — instead of one column per line — several columns, separated with a comma. In other words, something that looks like this:

POPLKLMNE,GKITLOPOM,QASSLKOPI
@jennybc
jennybc / 2014-10-12_stop-working-directory-insanity.md
Last active September 23, 2022 04:43
Stop the working directory insanity

There are packages for this now!

2017-08-03: Since I wrote this in 2014, the universe, specifically Kirill Müller (https://github.com/krlmlr), has provided better solutions to this problem. I now recommend that you use one of these two packages:

  • rprojroot: This is the main package with functions to help you express paths in a way that will "just work" when developing interactively in an RStudio Project and when you render your file.
  • here: A lightweight wrapper around rprojroot that anticipates the most likely scenario: you want to write paths relative to the top-level directory, defined as an RStudio project or Git repo. TRY THIS FIRST.

I love these packages so much I wrote an ode to here.

I use these packages now instead of what I describe below. I'll leave this gist up for historical interest. 😆

@seandavi
seandavi / platformMap.txt
Created November 13, 2014 20:49
Bioconductor/GEO platform mapping
"title" "gpl" "bioc_package" "manufacturer" "organism" "data_row_count"
"Illumina Sentrix Array Matrix (SAM) - GoldenGate Methylation Cancer Panel I" "GPL15380" "GGHumanMethCancerPanelv1" "Illumina" "Homo sapiens" 1536
"Illumina HumanMethylation27 BeadChip (HumanMethylation27_270596_v.1.2)" "GPL8490" "IlluminaHumanMethylation27k" "Illumina, Inc." "Homo sapiens" 27578
"Illumina HumanMethylation450 BeadChip (HumanMethylation450_15017482)" "GPL13534" "IlluminaHumanMethylation450k" "Illumina, Inc." "Homo sapiens" 485577
"GE Healthcare/Amersham Biosciences CodeLink™ ADME Rat 16-Assay Bioarray" "GPL2898" "adme16cod" "GE Healthcare" "Rattus norvegicus" 1280
"[AG] Affymetrix Arabidopsis Genome Array" "GPL71" "ag" "Affymetrix" "Arabidopsis thaliana" 8297
"[ATH1-121501] Affymetrix Arabidopsis ATH1 Genome Array" "GPL198" "ath1121501" "Affymetrix" "Arabidopsis thaliana" 22810
"[Bovine] Affymetrix Bovine Genome Array" "GPL2112" "bovine" "Affymetrix" "Bos taurus" 24128
"[Canine] Affymetrix Canine Genome 1.0 Array" "GPL39