Seen on reddit

January 31st, 2008

A man goes to his doctor and tells him, “I’ve had the song ‘What’s New Pussycat’ stuck in my head for weeks, and it’s driving me crazy.”

The doctor says, “Well, I think you may have Tom Jones disease.”

The man says, “I’ve never heard of that. Is it rare?”

The doctor says, “It’s not unusual.”


Moving to Dreamhost

December 13th, 2007

Thought I’d move from Rimu Hosting to Dreamhost.  The VPS we’re on is just too slow and anything that brings the load down is good.

I can’t move the secure sites as Dreamhost doesn’t provide any type of SSL, even a self signed cert from the wrong address, without switching to a static IP and handing over $50 US a year.

And as always happens, I got part way into the move and accidentally broke  something on the original and had to do a rush switch.  Ah, well.


Comparing integers

December 13th, 2007

Notes for next time:

You can check if the unsigned integer ‘a’ is greater than ‘b’ by adding the ones complement of ‘b’ to ‘a’ and testing carry.  A twos complement subtraction doesn’t work as a > 0 is always false.

Signed integers are similar but you first add 0×80000000 to both a and b.  This makes both unsigned without changing the order.


Test after move

December 6th, 2005

All relocated and imported. Now does posting work?


Engines for metaphilter++

September 20th, 2005

Django looks quite decent. Python (not PHP - good), built in basic admin, built in basic user accounts, and the template system is directly applicable to metaphilter.

I’ll give it a try using sqlite 3.2.6 and pysqlite 2.0.4.


Planet Planet Planet

September 3rd, 2005

Planet Planet Planet Mushrooms Mushrooms!


Automatic PC fan control

June 12th, 2005

Use a Atmel ATTINY26
as a serial port based fan controller for a PC. Tracy’s machine is very noisy but has built in sensors for the CPU and case temperature. Use a PC app to do closed loop control on the temperature. Run it hot-ish as the cooling effect increases with the temperature differential so the hotter it runs the slower the fan needs to run.

Use a FET for the fan drive. The reset case on the micro will be full noise. Could also use the on-board ADC and a resistor divider to sense the back EMF when the PWM is off to get an idea of fan speed.

It should be very cheap - the micro is $6.20 and there is _very_ little support circuitry. Instead of using the CPUs sensor, you could add 1-wire or similar temperature gauges directly to the Atmel but at significant additional cost.


Infinite Power!

June 11th, 2005

Nooooooooooooooooooooooooooooooooooooooooooooooooo!


Ratchet & Clank

June 10th, 2005

Woo. All done. Reasonable length, very linear, and a bit…easy. Solution to the big bad: empty 200 blaster rounds for stage 1. Re-stock using the PDA. Empty 200 rounds for stage 2. Re-stock. Tesla coil for the mines and groundies, and blaster, tesla, and devistator for stage 3.


Wireless temperature cluster

June 8th, 2005

For measuring the vertical temperature gradient cheaply at different stations across about a heactare of land. A heactare is 10000 m^2 or about 100×100 metres. You could use a set of 1-wire temperature sensors in a local cluster. Use a 433MHz radio link and coding similar to this wireless mouse trap and a battery pack to give greater than six month life.

It would need something to collect the information as you don’t want a laptop to be on all of the time. The individual stations could keep transmitting a rolling few days of data or use something like MRTG’s methods of collating data. Or keep something low power on all of the time that also decodes the protocol and provides a serial interface.

Basic costs:

  • Transmitter ~$4.20US
  • Dallas 18B20 sensor - $2.57US
  • Atmel ATTINY or similar - $5NZ

Mechanicals including a waterproof box and antenna, if any, would double the cost.