Skip to content

Instantly share code, notes, and snippets.

Tim van Werkhoven tvwerkhoven

  • ASML
  • Netherlands
Block or report user

Report or block tvwerkhoven

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
@tvwerkhoven
tvwerkhoven / README
Created Nov 6, 2011
iPhone 3GS battery life analysis & plots
View README
These files can be used to analyse the battery usage of an iPhone 3GS under real-life usage.
iphone_battery.csv: measurement data
proc_iphone_batt.py: process & plot data
@tvwerkhoven
tvwerkhoven / README
Created Sep 20, 2011
pyglyph -- identify unicode glyphs
View README
pyglyph -- identify unicode glyphs
* About
pyglyph.py can be used to decode unicode strings and identify the glyphs.
This can be useful if you want to know what exact glyph was used somewhere,
simply copy it and use it as input for pyglyph.
Pyglyph works best with python2.7 (because of argparse), but is compatible
with earlier versions.
@tvwerkhoven
tvwerkhoven / brew_install_git.log
Created Jul 21, 2011
brew install git on OS X 10.7
View brew_install_git.log
[tim@saturn] ~/tmp% brew install -v git
==> Downloading http://kernel.org/pub/software/scm/git/git-1.7.6.tar.bz2
File already downloaded in /Users/tim/Library/Caches/Homebrew
/usr/bin/tar xf /Users/tim/Library/Caches/Homebrew/git-1.7.6.tar.bz2
==> make prefix=/usr/local/Cellar/git/1.7.6 install
make prefix=/usr/local/Cellar/git/1.7.6 install
GIT_VERSION = 1.7.6
* new build flags or prefix
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
rm -f git-am git-am+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's/@@GIT_VERSION@@/1.7.6/g' -e 's/@@NO_CURL@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' git-am.sh >git-am+ && \
@tvwerkhoven
tvwerkhoven / brew_doctor.log
Created Jul 21, 2011
brew doctor on OS X 10.7
View brew_doctor.log
[tim@saturn] ~/tmp% brew doctor
"Git" was not found in your path.
Homebrew uses Git for several internal functions, and some formulae
use Git checkouts instead of stable tarballs.
You may want to install git:
brew install git
@tvwerkhoven
tvwerkhoven / add_test.c
Created Jun 23, 2011
Machine precision test
View add_test.c
/* add_test.c -- test machine precision for float and double datatypes
Compile: gcc -lm add_test.c -o add_test
Adapted from: http://virtuallyshocking.com/2008/01/14/float-vs-double/
This code iteratively increments a Real variable with a small amount,
leading to round-off errors. When the round-off error is bigger than
a preset value 'diff', it prints the number of iterations and the round-off
error at that point. Additionally it prints the error at each 100 iterations.
@tvwerkhoven
tvwerkhoven / xelatex-test.tex
Created Oct 29, 2010
Adaption of 'Beauty of LaTeX' by Dario Taraborelli (2008)
View xelatex-test.tex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% Dario Taraborelli (2008)
% The Beauty of LaTeX
% URL: http://nitens.org/taraborelli/latex
% Some rights reserved: CC-BY-SA
\documentclass[11pt,a4paper]{article}
\usepackage[dvipdfm, colorlinks, breaklinks, pdftitle={The Beauty of LaTeX},pdfauthor={Taraborelli, Dario}]{hyperref}
@tvwerkhoven
tvwerkhoven / newton.tex
Created Oct 29, 2010
Render of Newton's Principia in XeLaTeX
View newton.tex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
% Tim van Werkhoven (2010)
% newton.tex: Render of Newton's Principia in XeLaTeX
% Some rights reserved: CC-BY-SA
\documentclass[11pt,a4paper]{article}
\usepackage[dvipdfm, colorlinks, breaklinks]{hyperref}
@tvwerkhoven
tvwerkhoven / renamemp3.sh
Created Apr 5, 2010
Recursively rename all files in a directory
View renamemp3.sh
#!/bin/bash
#
# Recursively rename all files in a directory with the following rules:
# - Convert letters to lower case
# - Convert whitespace to underscore
# - Remove 'track' in the name
#
# Used to clean up filenaming of mp3s
#
# Tim van Werkoven, 20100405 <t.i.m.vanwerkhoven@xs4all.nl>
@tvwerkhoven
tvwerkhoven / fx33video.sh
Created Apr 5, 2010
Convert Panasonic FX33 videos
View fx33video.sh
#!/bin/bash
#
# Simple mencoder call to convert video from the Panasonic Lumix FX33 to xvid
# with mp3 in an avi container and x264 with mp3 in a mkv container. Run as:
#
# ./fx33video <input.mov>
#
# ffmpeg info about FX33 videos:
# Stream #0.0(eng): Video: mjpeg, yuvj420p, 640x480 [PAR 0:1 DAR 0:1], 30.00
# tb(r)
@tvwerkhoven
tvwerkhoven / renamemp3.py
Created Apr 5, 2010
Recursively rename all files in a directory
View renamemp3.py
#!/usr/bin/env python
# encoding: utf-8
#
# Recursively rename all files in a directory with the following rules:
# - Convert letters to lower case
# - Convert whitespace to underscore
#
# Used to clean up filenaming of mp3s
#
# Tim van Werkoven, 20090426 <t.i.m.vanwerkhoven@xs4all.nl>
You can’t perform that action at this time.