Skip to content

Instantly share code, notes, and snippets.

Tim van Werkhoven tvwerkhoven

  • ASML
  • Netherlands
View GitHub Profile
@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.
View .gitignore
*.aux
*.log
*.out
*.pdf
*.synctex.gz*
@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 / 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 / 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 / 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 / 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 / worddistance.pl
Created Apr 5, 2010
Find the word distance for each word, and signal words that are close together
View worddistance.pl
#!/usr/bin/perl -w
#
# Find the word distance for each word, and signal words that are close
# together. Can be useful for reviewing written text (papers, essays,
# whatever) to see if you might need a thesaurus somewhere.
#
# Tim van Werkoven, 20090426 <t.i.m.vanwerkhoven@xs4all.nl>
# This file is licensed under the Creative Commons Attribution-Share Alike
# license versions 3.0 or higher, see
# http://creativecommons.org/licenses/by-sa/3.0/
@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>
@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>
You can’t perform that action at this time.