Handy one-liners

Generate missing permalinks for flatfiled wordpress ls 201*/*/*/*/index.html| while read line; do indexname=`grep  ‘rel=”bookmark”‘ $line| sed ‘s/<h2><a href=”..\/..\/..\/..\///g’|sed ‘s/” rel=”bookmark” title=”.*//’| sed ‘s/%3Fp/\?/’`; echo “<html><head><title>Redirect</title><META http-equiv=\”refresh\” content=\”0;$line\”></head><body>Redirect to <a href=\”$line\”>$indexname</a></body></html>” > $indexname ; done   Fix links in flatfiled doc Continue reading Handy one-liners

Visualising scale: from bytes to zebibytes on a linear distance scale

  If one byte is the thickness of a single coat of paint (0.03cm) then… One kibibyte: laptop screen size, 14 in /35cm One mebibyte: height of revolving restaurant on CN tower, Toronto, 360 m One gibibyte: distance from London Heathrow Continue reading Visualising scale: from bytes to zebibytes on a linear distance scale