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">
 

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"
 

floating point bash calculator 30. Sep 2011

$ alias calc='bash -c '\''set -f; echo "scale=3;$0 $@" | bc -l '\'
$ calc 4/3
1.333
 

spotify on mac os x via ssh 13. Sep 2011

Mit despotify wird jedes unixoide System zur drahtlosen Jukebox!

despotify Screenshot

despotify Screenshot

Angenehmerweise gibt es despotify unter Mac OS X als Port:

$ sudo port install despotify
$ despotify

Have fun!

 

richard stallman in berlin 14. Jun 2011

Wie bereits lange angekündigt kommt am Mittwoch Richard Stallman nach Berlin. Die Veranstaltung hat freien Eintritt und erfordert keine Anmeldung, also gehe ich mal von campierenden Jüngern auf den Bürgersteigen und einer um den Block herum reichenden Schlange aus.

 

1 2 3 ... 6