Skip to content

Instantly share code, notes, and snippets.

View maehler's full-sized avatar

Niklas Mähler maehler

View GitHub Profile
@maehler
maehler / karabiner.json
Created April 9, 2019 15:06
Karabiner Mac configuration
{
"global":{
"check_for_updates_on_startup":true,
"show_in_menu_bar":true,
"show_profile_name_in_menu_bar":false
},
"profiles":[
{
"complex_modifications":{
"parameters":{
@maehler
maehler / new_revelations.sh
Last active April 5, 2019 12:11
Initialise a new reveal.js presentation.
#!/bin/bash
set -eu
usage() {
echo >&2 "usage: $0 <presentation_name>"
exit $1
}
if [[ $# -ne 1 ]]; then
@maehler
maehler / gwas_gsea.cpp
Last active February 13, 2019 14:21
GWAS gene set enrichment analysis
#include <Rcpp.h>
#include <random>
using namespace Rcpp;
struct gsea {
float score;
NumericVector running_sum;
int N;
int N_h;
float N_r;
@maehler
maehler / .tmux.conf
Created January 11, 2015 12:54
.tmux.conf
# reload settings
bind-key R source-file ~/.tmux.conf
# Ctrl-Left/Right cycles thru windows (no prefix)
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+
# Quick pane cycling
bind-key ^B select-pane -t :.+
@maehler
maehler / fileset.py
Created April 16, 2014 17:29
Quick and dirty python script for performing set operations on lines in files.
#!/usr/bin/env python
import argparse
import os
def parse_file(fname):
with open(fname) as f:
return set(line.strip() for line in f)
def print_set(s, count=False):
@maehler
maehler / sticky.css
Last active December 17, 2015 14:39
A simple setup for a sticky footer (http://ryanfait.com/sticky-footer/) using the unsemantic CSS framwork (http://unsemantic.com/).
html, body { height: 100%; }
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -50px;
}
.grid-container {