This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# About | |
# ===== | |
# | |
# Log battery info from command-line with SYSTEM_PROFILER(8) and IOREG(8) to a | |
# user-configurable directory. | |
# | |
# Run with -h to see usage options. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
@file coconut_plot.py -- plot Macbook battery data | |
@author Tim van Werkhoven | |
@date 20121223 | |
@copyright Copyright (c) 2012 Tim van Werkhoven <[email protected]> | |
This scripts plots data exported from [CoconutBattery.app][1] as CSV. This | |
can be useful to graphically investigate your battery performance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
# -*- coding: utf-8 -*- | |
""" | |
@file mac-dict.py -- lookup entries in the Mac dictionary | |
@author Tim van Werkhoven | |
@date 20111220 | |
@copyright Copyright (c) 2011 Tim van Werkhoven | |
Use DictionaryServices to look up words in Apple's Dictionary.app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.aux | |
*.log | |
*.out | |
*.synctex.gz* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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+ && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!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} |