Posted by Mark
Fri, 27 Jan 2006 11:20:00 GMT
Yeah, I’ve been a bit quiet. I generally only post when something’s really annoying me, so it’s quite frequently something trivial but fiddly. I’ll try to post something a little more entertaining.
Anyway, I’ve split up with Madeleine, and moved into Tom and Gordon’s place. This has been pretty cool so far: in terms of live music, good food and running into friends serendipitously, newtown is a big step up from maroubra. Unfortunately, in terms of quiet working time and closeness to the beach, it’s a bit of a step back. I’m going to have to find some way of carving out some time to do work and be pretty defensive about it.
Just to see if anyone’s reading my blog: Spurs for Jesus are playing at the Hopetoun this Sunday. Find me there, mention this blog, and I’ll buy you a beer. (Uh, limited to the first five or something - I don’t want to become an extremely poor internet phenomenon.)
no comments | no trackbacks
Posted by Mark
Mon, 16 Jan 2006 06:38:00 GMT
Getting gcc to cross-compile symbian code on the mac is not so easy, it seems. after a mountain of errors, I finally beat it into submission with this heinous, hamfisted effort:
find . -type d -exec cp /Users/mwotton/projects/symbian/newgcc/src/ltmain.sh {} \;
repeated for each file it couldn’t find. Rob Pike must be spinning in his grave. (Or cubicle, I don’t know what the Google offices are like.)
So with any luck, super-sekrit mobile phone geolocation effort can get started soon…
1 comment | no trackbacks
Posted by mwotton
Thu, 01 Dec 2005 01:47:29 GMT
Apologies to anyone hoping for an interesting post, this is more or less public thinking aloud.
I want to be able to force one controller in a Rails project to accept connections only in https, and for attempts to connect with http to redirect to the https version. Dually, I’d like other controllers to redirect https connection attempts to the http page. Apache is set up to redirect to Rails in either event, so there shouldn’t be anything particularly tricky about it; I just need appropriate redirections. As I see it, I have two options:
- beforefilter in application.rb to redirect to http: beforefilter in sensitive controllers to redirect to https.
- fiddle with routes.rb to redirect at that level
no comments
Posted by mwotton
Tue, 25 Oct 2005 13:52:00 GMT
Well, this is mildly annoying. If you try to forward a range of ports in the DSL 502-T ADSL modem from DLink, it seems to forward them all to the same port on the internal machine. It’s an embedded linux machine underneath, so I’m almost tempted to hack it to do the right thing, but it smells like a massive time sink, and I have enough of those already.
Also looking into traffic shaping for Linux… it’s a bit more complicated than the usual setup, as I only want to throttle connections to the outside world - no point throttling your LAN transfers. Still, tc looks like your typical swiss army chainsaw, so I’m sure it’s doable with a little skullsweat. (Why is this sort of fiddling so much more appealing than paying work? One day I’ll work it out.)
Edit: well, the subtle approach didn’t work. tc didn’t want to work on virtual devices, or I could have just created eth0:1 and run wondershaper on it. In the end, the simplest way was to brute force it - I chucked another network card in, assigned it another IP on the same network, and used route to make it the route to the router. Thus, I can run wondershaper on that interface without affecting my normal LAN traffic.
Still have to work out how to get that port forwarding working, though.
Edit: route to make it the route to the router? Lordy. I won’t be winning any English composition prizes for that little gem…
Posted in hardware | 15 comments | no trackbacks
Posted by mwotton
Mon, 24 Oct 2005 13:41:49 GMT
Like many carefree young programmers, I own a laptop (17” powerbook) which I think is approximately better than sex. At the same time, there are things to which it’s less than perfectly adapted, bittorrent downloads being one of them. To wit:
1. I take my laptop onsite occasionally. At the very least, this means that my downloads are interrupted: at worst, I gank my client’s network connection by accident. (Hasn’t happened yet, but it’d only be a matter of time.)
2. The Mac clients I’ve found seem rather resource hungry: on a single download with Tomato Torrent, my CPU usage hovers around 70%.
3. If I download to my laptop, I still have to transfer it to the shared drive. This may seem a trivial objection, but I’m a lazy man, and I have a desktop full of downloads to prove exactly how lazy.
4. It’s easier to set up throttling on my Linux box. Bittorrent being a greedy protocol, this is important.
So what’s a lazy programmer to do? Write a script, of course.
Read more...
4 comments
Posted by mwotton
Fri, 21 Oct 2005 04:21:00 GMT
I’ve learnt many languages, almost all aimed at making a computer more pliant to my ridiculous demands. This, I fear, has eroded my social skills to the point where I think only in orders. This cannot stand: I know only one natural language in which I can do more than say hello. Therefore, o thou non-existent readers, I ask you, in the confident expectation of hearing nothing: what language should I learn? I’m swinging between Mandarin, Cantonese, and Irish.
(Edit: I’m quite partial to the learning aids at byki.com, but I’m worried that I’m just parroting phrases without learning the underlying grammar, like PHP programmers. (Yes, cheap. I know))
Posted in language | 5 comments