December 17th, 2008
I’ve been using Dropbox for quite some time to transfer files from work to my home PCs. This is worked well for months, but I finally filled my dropbox account.
As I have a linux box at work and a linux box at home I decided to try and setup some simply one way mirroring system. I.e. mirror documents from work to my home PC.
I looked at using unison, which I used to mirror many other directories but I couldnt get it to connect out from my work PC. It appears to lack socks support. I know I could use ssh port forwarding to sync via sockets but this would be more complicated.
I decided to use rsync via ssh.
There was one main issue though, I needed to get ssh to work over our proxies. We have a few http proxies and 1 socks proxy. The http proxies will not connect to arbitrary ports so I ended up using the socks server.
I knew the socks server worked as I’ve used it with putty for years, so I just needed to figure out how to setup ssh to use it.
After lots of search and finding articles regarding port forwarding and nothing about using a socks proxy I found 1 good article.
I use gentoo linux so I emerged net-misc/connect which supports socks servers.
emerge -auv net-misc/connect
Once I had the connect utility installed I needed to edit my ssh config file. I only have 1 user configured on my linux box at work so I edited the ~/.ssh/config file.
This is what I added
Host stokebloke.com
ProxyCommand connect -S user@socks-server:1080 %h %p
Host www.stokebloke.com
ProxyCommand connect -S user@socks-server:1080 %h %p
Host homebox.homelinux.net
ProxyCommand connect -S user@socks-server:1080 %h %p
You can also do the same thing with cygwin too. Instead of using connect program its called connect-proxy in the network section of the cygwin installer.
After I got this far I needed to configure rsync to work via this ssh connection which, it turns out, is very simple.
rsync --progress -avrz -e ssh src_dir/ user@homebox.homelinux.net:~/dest_dir/
This results in the src_dir existing inside the dest_dir.
Tags: Cygwin, gentoo, proxy, rsync, socks, ssh
Posted in Cygwin, Linux | No Comments »
December 3rd, 2008
Well I finally got some time to play with the new version of blender.
I also generated some slightly higher resolution STL files from Modeling.
I then managed to render these two new versions which I’m quite impressed with.


More are available here.
Tags: Blender, Lego, Render
Posted in Blender | No Comments »
November 13th, 2008
For many years our product used the following code to open URLs or files on Windows 2000 and XP.
final String[] cmds = { "cmd.exe", "/C", "start", "/B ", "/WAIT", url };
Runtime.getRuntime().exec(cmds);
This code is really simply and works well. If you have different editors configured for a specific file type the start launches the correct viewer/editor. It also opens the users preferred web browser too.
We didn’t have many issues with this until we started added more localisations to our product and supporting unicode fully.
This code in theory looks good, but it didn’t work in many cases. I found that the cmd.exe process on a European Windows system runs in ISO-8859-1 so any arguments we passed it get completely messed up.
This means the cmd.exe cannot be used as it doesn’t support unicode.
I spent days looking for another alternative but couldnt find a java only fix. In the end we had to use JNI and use the Windows ShellExecuteExW and ShellExecuteEx calls (based on whether we used a unicode or none unicode string)
Tags: java, Programming, unicode, Windows
Posted in Programming | No Comments »
November 13th, 2008
I’ve started to use more and more ISO images as disk space is becoming cheaper and its a lot easier to manage ISO files compared to physical CDs/DVDs. Mainly because I keep forgetting where I put the physical media.
Linux
Create an ISO file using dd
dd if=/dev/cdrom of=image.iso
Mount the ISO using local loop back (you may need to be root)
mkdir /mnt/disk
mount -o loop image.iso /mnt/disk
Windows
For Windows you should get a copy of the free program MagicDisk
I use it all the time at work and I’ve never had any problems with it. Its small simply and works well.
Tags: cdrom, dvd, howto, iso, Linux, Windows
Posted in Random | No Comments »
October 21st, 2008
Well my Burton Custom 156cm 2009 arrived. It looks cool.

I also bought the Burton Cartel EST bindings, in black.

I simply can’t wait to try them out. I think I should buy a lock for them though. I dont fancy having them nicked on first holiday. The cost around €800 in total, so they better last 8 years like my last Burton Custom (2000).
Tags: bindings, burton, holiday, mountain, snowboard, Snowboarding
Posted in Snowboarding | No Comments »