forcing tidy to repair broken html 27. Jan 2012
$ curl -sL http://bit.ly/xpkkso | tidy 2>&1 | sed -n '105,106p'
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.
$ tidy -help-config | grep force
force-output Boolean y/n, yes/no, t/f, true/false, 1/0
$ tidy -show-config | grep force-output
force-output Boolean no
$ curl -sL http://bit.ly/xpkkso | tidy --force-output true \
2>/dev/null | head -n 5
<!DOCTYPE html>
<html b:version='2' class='v2' dir='ltr'>
<head>
<meta name="generator" content=
"HTML Tidy for Mac OS X (vers 25 March 2009), see www.w3.org">
safariomnibar port for powerpc 13. Jan 2012
I did a port of Olivier Poitrey’s SafariOmnibar for Macs with PowerPC processor running Safari 5.0.6 on Mac OS 10.5.8. Go ahead and grab the current version over at Github.
sync 28c3 conference torrents 29. Dec 2011
Um die Server des 28C3 nicht unnötig zu belasten ziehe ich mir zwar nur die Torrent-Dateien der Mitschnitte, aber selbst das kann teilweise zu einem Geduldsspiel werden. Wie ich feststellen musste bekommt man bei jeder Verbindung zu mirror.fem-net.de einen anderen Mirror zugewiesen. Manche davon funktionieren gut, manche weniger gut und manche garnicht.
Insgesamt scheint es fünf Stück zu geben:
$ dig +short mirror.fem-net.de |\
xargs -n 1 dig +short -x | sed 's/.$//'
mirror.netcologne.de
bork.informatik.uni-erlangen.de
ramses.wh2.tu-dresden.de
ftp.uni-kl.de
mirror.selfnet.de
Bei meinen Versuchen erwiesen sich die Server der Uni Kaiserlautern und das Wohnheimnetzwerk Stuttgart (“Selfnet”) als recht performant. Mithilfe von Fuse4X und CurlFtpFS synchronisiere ich nun regelmäßig die Torrent-Dateien der Video-Mitschnitte.
$ sudo port install fuse4x curlftpfs
$ mkdir /Volumes/28C3
$ curlftpfs ftp://mirror.selfnet.de/CCC/28C3/mp4-h264-HQ/ \
/Volumes/28C3
$ rsync -hav --include '*/' --include '*.torrent' \
--exclude '*' /Volumes/28C3 ~/Desktop
Nachtrag: Die RWTH Aachen bietet auf ihrem inoffiziellem Mirror auch rsync an.
$ rsync -hav --include '*/' --include '*.torrent' --exclude '*'
rsync://ftp.halifax.rwth-aachen.de/ccc/28C3/mp4-h264-HQ/ ~/Desktop
Nachtrag: Mittlerweile gibt es auch einen Gesamttorrent (~48 GB).
vox for mac os x website moved 15. Oct 2011
The minimalist Mac OS X audio player of Alessio Nonni has moved. Check out the new Vox website for a Lion compatible version. If you enjoy the app don’t hesitate to make a donation to support the suffering italian economy a talented developer!
really empty the safari cache 11. Oct 2011
After telling Safari to empty the cache I wondered If Safari actually did what I told it.
$ du -sh ~/Library/Caches/com.apple.safari
629M /Users/stefan/Library/Caches/com.apple.safari
Hm, 626 megabyte don’t look like obedience to me. Let’s see what’s in there.
$ du -sh ~/Library/Caches/com.apple.safari/*
173M /Users/stefan/Library/Caches/com.apple.safari/Cache.db
5.6M /Users/stefan/Library/Caches/com.apple.safari/Extensions
450M /Users/stefan/Library/Caches/com.apple.safari/Webpage Previews
64K /Users/stefan/Library/Caches/com.apple.safari/com.apple.opencl
450 megabyte of “Webpage Previews”?
$ find ~/Library/Caches/com.apple.safari/Webpage\ Previews -type f \
| sed -E 's/.*\.([^\.]*)/\1/' | sort | uniq -c
7016 jpeg
400 png
No wonder we need gigabyte sized hard disks today. Let’s delete the crap altogether.
$ rm -r ~/Library/Caches/com.apple.safari
And let’s make sure it doesn’t come back (works in Safari 5.0.3).
$ defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
So, what have we gained after restarting Safari?
$ du -sh ~/Library/Caches/com.apple.safari | awk '{print $1}'
3.6M
Nice, especially in times of undersized solid state disks.