Skip to content

Instantly share code, notes, and snippets.

@martijnvermaat
martijnvermaat / example.png
Last active August 29, 2015 13:56
Overlap-relative centers
example.png
@martijnvermaat
martijnvermaat / logo.ipynb
Last active August 29, 2015 13:56
kMer logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@martijnvermaat
martijnvermaat / userContent.css
Last active August 29, 2015 14:03
Hide comments on Losse Veter (losseveter.nl)
/*
* Hide comments on Losse Veter (losseveter.nl)
*
* Most of the user comments on Losse Veter are either racist or zealot
* epistels about doping. With this Firefox setting, you can enjoy just
* the track and field news.
*
* Edit this file and copy it as userContent.css into your Firefox
* profile-directory/chrome/
*/
@martijnvermaat
martijnvermaat / limit-directory-size
Created September 6, 2014 00:12
Limit directory size by deleting files accessed least recently
#!/bin/bash
# Limit directory size by deleting files accessed least recently.
#
# Use inotify to wait for files written to the specified directory. On such an
# event, and if the directory size is over the specified maximum size, keep
# deleting files until the size is below the maximum. Repeat (so, never exit).
#
# Names of deleted files are written to stdout, messages are prefixed with the
# string ">>>".
#
@martijnvermaat
martijnvermaat / .gitignore
Last active August 29, 2015 14:07
Profiling k-mer pairwise comparison
.ipynb_checkpoints
*.pdf
*.fa
[abcde].k1
[abcde].k2
[abcde].k3
[abcde].k4
[abcde].k5
[abcde].k6
[abcde].k7
@martijnvermaat
martijnvermaat / windows_batch_checker.md
Created January 30, 2015 10:52
Running the automated Batch Checker

Running the automated Batch Checker

(By Jeroen Laros.)

Installation

Python core libraries

Go to the Python website. In the Downloads tab, click the Python 2.7.9

@martijnvermaat
martijnvermaat / app.jsx
Last active August 29, 2015 14:20
plexus-form #31
'use strict';
var React = require('react');
var Form = require('plexus-form');
var Example = React.createClass({
getInitialState: function() {
return {values: {name: 'Pierre'}};
},
onSubmit: function(output, value, errors) {
@martijnvermaat
martijnvermaat / monkey.py
Created July 27, 2011 08:32
Monkey patch for the Python SUDS library
"""
Monkey patch: http://en.wikipedia.org/wiki/Monkey_patch
"""
def monkey_patch_suds():
"""
Apply our monkey patch for the suds package.
For some weird reason the location http://www.w3.org/2001/xml.xsd is used
@martijnvermaat
martijnvermaat / clean_directory.py
Created August 19, 2011 12:00
Clean a directory (e.g. cache) by removing rarely used files.
#!/usr/bin/env python
"""
Clean a directory (e.g. cache) by removing rarely used files.
Usage:
./clean_directory directory [max_size]
The max_size argument is expected in megabytes. File removals are reported to
standard output and afterwards empty directories are (silently) removed.
@martijnvermaat
martijnvermaat / try.py
Created November 23, 2011 13:38
Try something a predefined number of times
#!/usr/bin/env python
"""
Example Python pattern: try something a number of times, and only really fail
after that.
"""
import sys
import time