Some small changes

Ok, this post may come as a surprise to my 4 readers (two, excluding people I meet every day) BUT I finally took some time to apply some changes:

  • site look has been changed. I still want to replace the standard theme pictures with my own, but this wil take a little longer
  • the feed address has been converted to the “new” feedburner URL. Old link may still work, I don’t know how long and if it will still be updated. New link is https://www.kill-9.it/blog/index.php/feed or http://feeds.feedburner.com/kill-9/iUgf
  • did you notice that the link above is to https? most of the site should now work seamlessly over both http and https. I plan to make it accessible over https only in the near future, even if some resources may remain over plain https.

that’s all, see you in a couple of years. :)

TODO: turn IPv6 on. I’m not far from that too.

A tiny Transmission.app hack

(A post every 10 months. I hope that does not annoy you :) It will not take long to read, anyway. )

Transmission is a great BitTorrent client. It is full of features (look at the site!), including bandwidth control, and runs on every platform (Linux and Mac :P).
You can choose global upload and download speeds, or shape single torrents among those you are working with.
At home I have a 10mbit connection to the Internet so I rarely limit the torrents, but most of the time when I do it is to reserve a small quantity of bandwidth for Internet browsing while I wait, or to play online.

Transmission is a bit rigid regarding the possible speeds: the only possible values (for both upload and download) expressed in kilobytes/sec are 5, 10, 20, 30, 40, 50, 75, 100, 150, 200, 250, 500, 750, 1000, 1500, 2000. My home network chokes around 600. I could set for 500k, but where’s the fun?

So:

  • head to https://trac.transmissionbt.com/wiki/Building and read thoroughly [the part specifying that you need to have XCode installed, for example]
  • learn that “Building the project on Mac requires the source to be retrieved from SVN. Pre-packaged source code will not compile.
  • download the SVN code (uhm, yes. I also have pkgsrc installed):
    svn co svn://svn.transmissionbt.com/Transmission/trunk Transmission
    in my case the version number was 2.11 1133-something.
  • run a “dry” compile run — this will guarantee that the code is not broken before you start tinkering with it or that you have some local issue (my first time doing actually something with XCode. Easier than I thought, the source has an XCode project file)
  • find the relevant source files (grep was my friend). In the end I only modified Controller.m and TorrentTableView.m: find the line
    const NSInteger speedLimitActionValue[] = { 5, 10, 20, 30, 40, 50, 75,
    100, 150, 200, 250, 500, 750, 1000, 1500, 2000, -1 };

    and modify it to match the speeds you want to be able to use. You can add or remove values as you like as long as the syntax is right.
  • compile it again and run it. :)

If I were a programmer, I’d have implemented something that would allow the user to choose the speed as he liked — but this fits my needs.

Snow Leopard Trash, again

At first I did not notice, but emptying the trash took ages, even “not securely”.
Well, being the geek I am I did a quick dtruss on the Locum process, which spit out a huge list of write_nocancel syscalls. So, it seems it was actually writing stuff over the files I asked him to delete, even if I never asked him to (I just did a right click on the Trash icon, and selected “Empty Trash”). WTF?

Well, I learned (thanks Google) that Snow Leopard does a secure erase of the trash by default. Annoying.
And that I did not realize that until now. Embarassing.

So, this can be solved at least in two ways:

The GUI one
Go into Finder preferences, Advanced, and uncheck “Empty Trash securely”

Finder Preferences Window

or

the CLI one
Go into ~/Library/Preferences, convert the Finder preferences to xml (it’s binary by default)
plutil -convert xml1 com.apple.finder.plist
and change the stanza

<key>EmptyTrashSecurely</key>
<true/>

to
<key>EmptyTrashSecurely</key>
<false/>

Flickr.com down


beepbeep:~ zen$ date
Tue Oct 20 19:34:42 CEST 2009
beepbeep:~ zen$ host www.flickr.com
www.flickr.com is an alias for www.flickr.vip.mud.yahoo.com.
www.flickr.vip.mud.yahoo.com has address 68.142.214.24
www.flickr.vip.mud.yahoo.com mail is handled by 0 .
beepbeep:~ zen$ telnet www.flickr.com 80
Trying 68.142.214.24...
telnet: connect to address 68.142.214.24: Connection refused
telnet: Unable to connect to remote host

weird.
The very same www.flickr.vip.mud.yahoo.com handles api.flickr.com (which is, unsurprisingly, down).
Doesn’t look smart from here.