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.
downgrade safari 5.1 to 5.0.x on lion 11. Oct 2011
If you want to downgrade Safari 5.1 to Safari 5.0.x on Lion you can download Safari 5.0.3 from the original Apple servers and extract just the Browser with Pacifist. The installation image is called Safari5.0.3SnowLeopard.dmg but it works just fine on Lion. Have fun!
pirates against age discrimination 10. Oct 2011
Welche Rolle spielt es für Ihre Arbeit als Abgeordnete, dass Sie so jung ins Parlament gewählt wurden?
Susanne Graf (19): Man muss sich seinen Respekt erst einmal erarbeiten. Gerade als junge Person wird man nicht immer sofort ernst genommen. Ich habe keinen Berufsabschluss, ich habe gerade mal Abitur gemacht. Gerade bei älteren Leuten ist es so, dass sie das Gefühl haben, sie haben die Weisheit mit Löffeln gegessen. Natürlich haben sie mehr Lebenserfahrung, das will ich gar nicht bestreiten. Aber man muss einfach lernen, jedes Alter zu schätzen. (Quelle: Tagesspiegel)
recursive chmod and chown on files 07. Oct 2011
If you want to recursively apply permissions to files it’s best to use GNU parallel because it handles obscure filenames robustly:
find directory -type f | parallel -m chmod mode
If you want to change ownership of the files, you can use a root subshell:
sudo bash -c "find directory -type f | parallel -m chown user:group"