Skip to content

Instantly share code, notes, and snippets.

Ruben Verweij rbnvrw

Block or report user

Report or block rbnvrw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rbnvrw /
Last active Mar 10, 2020
Annotate, convert, crop, speed-up, scalebar overlay of an ND2 movie

See the Python notebook for the code. If you scroll down all the way down, you see an example of the last frame in a tracked, cropped and sped-up video. Features:

  • Convert an ND2 movie into avi/mp4/mov/wmv format
  • Add a scalebar of your choice to the movie
  • Speed-up the movie by a certain factor
  • With a csv file containing (frame,x,y,r,particle) columns: overlay the trajectories, particle number, circle of tracked radius
rbnvrw /
Last active May 14, 2016
Building Vim from source on Fedora 23 (see for an explanation)
sudo dnf install -y ruby ruby-devel lua lua-devel luajit \
luajit-devel ctags git python python-devel \
python3 python3-devel tcl-devel \
perl perl-devel perl-ExtUtils-ParseXS \
perl-ExtUtils-XSpp perl-ExtUtils-CBuilder \
# symlink xsubpp (perl) from /usr/bin to the perl dir
sudo ln -s /usr/bin/xsubpp /usr/share/perl5/ExtUtils/xsubpp
git clone vim-src
cd vim-src
rbnvrw / .vimrc
Created Mar 15, 2016
Pandoc tables
View .vimrc
function! s:tablePandoc() range
exe "'<,'>Tabularize /|"
let hsepline= substitute(getline("."),'[^|]','-','g')
exe "norm! o" . hsepline
exe "'<,'>s/-|/ |/g"
exe "'<,'>s/|-/| /g"
exe "'<,'>s/^| \\|\\s*|$\\||//g"
exe "'<,'>!pandoc -f markdown -t rst"
command! -range=% TablePandoc :call <SID>tablePandoc()
rbnvrw / .vimrc
Last active Mar 12, 2016
Quick vim tips
View .vimrc
" move vertically by visual line
nnoremap j gj
nnoremap k gk
" highlight just the 81st column of wide lines... (Damian Conway)
highlight ColorColumn ctermbg=magenta
call matchadd('ColorColumn', '\%81v', 100)
" Enable code folding
set foldenable
rbnvrw / fix_after_scan.bimp
Created Oct 20, 2015
GIMP batch scripts (BIMP)
View fix_after_scan.bimp
#BIMP 1.16
rbnvrw /
Last active Sep 4, 2018
Adding scalebars to images in LaTeX

Scalebar with background

Scalebar with background

To change the backgroundcolor, adjust the scalebgcolor variable to use the desired color. Add the following code to your preamble:

\usepackage[usenames, dvipsnames]{color}
rbnvrw /
Last active Aug 29, 2015
Usefull LaTeX snippets

Framed equations


  highlight math style={
rbnvrw /
Last active Apr 29, 2020
python-igraph example
from igraph import *
import numpy as np
# Create the graph
vertices = [i for i in range(7)]
edges = [(0,2),(0,1),(0,3),(1,0),(1,2),(1,3),(2,0),(2,1),(2,3),(3,0),(3,1),(3,2),(2,4),(4,5),(4,6),(5,4),(5,6),(6,4),(6,5)]
g = Graph(vertex_attrs={"label":vertices}, edges=edges, directed=True)
visual_style = {}
rbnvrw / diagram.svg
Last active Oct 14, 2015
Autolayout graph nodes for interrelation diagram
View diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.