Tuesday, August 01, 2017

A couple of cheap Macintosh SE's

A friend found a bunch of Macintosh SE's at at recycling center a while ago (year?) and I was finally able to go and pick them up a couple of weeks ago.

Two Macintosh SE FDHD models and three dual DD floppy drive models.

One of the FDHD has been used as a server, and digging around the drive I was able to find out that they had been used at a school in Lahti in the 1990s.

Documents where dated around 1994 and some log files said 1996 so they have probably been unused for 20 years or so.

Apple Macintosh SE
I picked them up on the way to our summer cottage, so to be able to test them I grabbed, what I thought to be, a SCSI box with Mac System on it with me.

Unfortunately my memory had failed me and I took some other systems SCSI disk so I didn't have anything to boot from until I got back home. The server did boot up but directly into AppleShare. And obviously I didn't have any administrator password codes so I couldn't disable it.

Back home I got the right SCSI disk box connected and everything seems to work just fine.

You can see the price in the above picture, 10€ :) (And luckily for me I didn't need to pay anything for them, all free :)

Thursday, February 23, 2017

Coding don'ts: enourmous if blocks

When wading trough other peoples code I find these annoyingly large if structures, especially used inside while/foreach loops that check if some item is ok to process or not.

Especially in PHP code for some reason or another. It's like people don't know about continue.

Don't do this!

foreach ($something as $item) {
 if ($item) {
   .. screenfull of code ..

Do this instead

foreach ($something as $item) {
 if (!$item)

 .. screenfull of code ..

Thursday, November 03, 2016

A bit of progress on ScummVM for BB10

Got it building and running, there where some funny business with C++ libraries and alsa that for some reason didn't happen under the PlayBook SDK.

Indiana Jones and the Fate of Atlantis on BB10
Still, needs bit of work on the control side, especially on this small screen trying to point with a finger is quite hard.

Video of ScummVM running Indiana Jones and the Fate of Atlantis on running on a DevAlpha C (Q10)

Onkyo receivers, very insecure networked devices

I've been working now awhile on my Onkyo Qt ISCP library and there is one not so funny thing about the protocol. There is no authentication or authorization whatsoever. So basically if you happen to be on the same network as a networked Onkyo you can do whatever you like.

From the not-too-bad: Change radio channel, switch input
To the not-so-nice: Turn the volume up as high as it goes, stream something nasty

Even the device setup web interface is open to everyone.

So don't put a networked Onkyo on a public IP and keep it on a private network that no outsiders can access.

Sunday, August 14, 2016

Gotchas in Drupal, part 1. Date field storage formats.

I've been working with Drupal now for about 3 years now. From time to time there are things that are just strange design decisions or just plain stupid.

One such thing is Date fields, there are a couple of them with no clear documentation (on the Field management page that is, there are if you Google, but who does that?). Anyway, I needed a Date field. The ISO sounded good, pretty much assumed it was just related to the data entry as I was going to feed in a 170000 nodes with date & time field in a easy for machines to parse format.


Drupal uses, obviously, a SQL database. Meaning that dates, should, obviously be stored in a SQL a DATE, TIME, DATETIME type right ? Oh, no no no.

What does Drupal do ? Use a varchar.

No wonder searching, by date ranges, on my collection of 170000 nodes was just a tiny bit slow.

Thursday, July 21, 2016

Basic IR remote control for arduino train

Got inspired a while ago and added IR remote support to the train set. Lights can be turned on/off and the train can be fully controlled with the Play/Stop/Pause/FF/RW and Prev/Next track buttons.

  • Play will start the train slowly to a set speed
  • Stop will engage the brakes and stop the train
  • Pause will slowly stop the train
  • FF & RW controls the speed
  • Prev/Next will change train direction (when stopped)
  • Number buttons (1-3) toggles building lights
The remote itself is a random Sony CD player remote I had laying around at home.
A quick video below:

The code is available on github