John Borwick’s blog

Neat stuff John likes.

July 27th, 2005

SysAdmin Purity Test

Well, I had about finished the SysAdmin Purity Test when I accidentally reloaded my browser. It was still enjoyable to see all the questions. I estimate I said yes to around half of them.

I had forgotten about wuarchive.wustl.edu.

July 27th, 2005

file types

To get a list of all the file types in a directory structure…

find . -type f | perl -lne 'print $1 if m|([^.]+)$|' | sort | uniq -c | sort -n
July 27th, 2005

deep-linking to images

I just turned off deep-linking (direct linking) to images on johnborwick.com, with this handy article on preventing image theft. Thanks!

cat >> .htaccess <<_EOF_
SetEnvIfNoCase Referer "^http://(www.)?johnborwick.com/" local_ref=1
<FilesMatch ".(gif|jpg)">
    Order Allow,Deny
    Allow from env=local_ref
</FilesMatch>
_EOF_
July 27th, 2005

konfabulator now free

Yay! Konfabulator is now free! I’m using it once again, but its “What to Do?” widget was depressing me: it kept saying “You Have Nothing To Do” in the corner, but really that’s not the case.
Fixed like so:

find ~/Documents/Widgets/ -name 'What To Do.kon' -print0 |
  xargs -0 perl -i -pe 's|"You Have Nothing To Do"|"No Tasks"|g'

(The -print0/-0 is really important, and a cool trick, because it lets you use xargs with files that have spaces in their names.)

|