East of the Sun, West of the Moon

2007/5/25

EDID?

Filed under: OS X,Projects,Software — Erwin @ 5:35 pm

So apparently Apple has been fooling a lot of laptop owners (including myself, it looks like) into thinking that their screens can display millions of colours. Do a little googling and I’m sure you’ll find the relevant news articles, blogs, and whatever else.

For users to find out what kind of screen they have, the current suggestion is to download the SwitchResX Control Panel, run Export DCC and use the brand and other identification from that file to look up the specs online.

Downloading 1.3MB of software to find that out is slightly overkill. Wikipedia describes the contents of the EDID data fairly accurately and if you want more there’s a link to a PDF file on the same page. Combine that with the ioreg program that dumps lots of information of your hardware on stdout, and you have the ingredients to write a quick’n’dirty Perl script that’ll read that, pick out the right line, and explain those bytes in more understandable language to the best of its ability.

The relevant parts are at the end, which will look something like this:

Descriptor Block 3
  93: Block type: (fe) ASCII string
    "B154PW01 V0"

Descriptor Block 4
  111: Block type: (fc) Monitor name
    "Color LCD"

You can find specs for B154PW01 online, and yes it does say 262k colours there, not 16.7 million.

It would be interesting to see how well the script works for other card/monitor combinations. I tried it on the Mac Mini with the TV adapter, for instance, which enlightened me that it uses analog input and one of the descriptor blocks is an ASCII string that says “NTSC/PAL”. Indeed!

Improvements to the script will be happily accepted, of course. πŸ™‚

Update: Improved it to unpack the manufacterer ID, which turns out to be 3 characters encoded into two bytes. So “0610” turns into “APP”, for instance.

2007/3/26

Kill A Watt results (1)

Filed under: Projects,Technology — Erwin @ 1:24 pm
Apple 85W Portable Power Adapter:
MBP fully charged, asleep 1-2W
MBP fully charged, 10-20% CPU load 25-35W
MBP charging (at 60%), asleep 30-35W
MBP fully charged, 80-100% CPU load 40-50W
MBP charging (at 0%), asleep 45W
MBP charging (at 14%), asleep 45W
MBP charging (at 60%), 10-20% CPU load 55-60W
MBP charging (at 10%), 10-20% CPU load 70-85W

Specs for the MBP:

  • 2GB RAM
  • 2GHz Core Duo

I was pleasantly surprised to see that most of the time the MBP uses less than a regular 40W bulb.


Cellphone charger:
Fully charged, while phone is off 1W
Fully charged, while phone is on 1W
Charging, while phone is off 2-3W
Charging, while phone is on 3-4W

Just for comparison (not very useful otherwise):

  • Charger is an iGo
  • Cellphone is a Motorola 120E, sturdy but quite due for a replacement!


2007/2/18

Media Mini

Filed under: OS X,Projects,Technology — Erwin @ 4:45 pm

The $19 gadget works as expected. Note to self: Do not stray from the two known-to-work resolutions (640×480 and 800×600) or you’ll have a wonderful time getting back to one of those, while the screen rolls in ways that make your head ache and spin!

I’ve got the original Mac Mini (the first one I bought, just over two years ago) hooked up and it quite happily runs iTunes (for video-casts) and MythTV’s front end software. The latter was a minor surprise for me, because I haven’t actually hooked it up to ethernet yet, so it’s doing the streaming over wireless! Obviously it’s a bit faster than the 700-800MHz Celeron machines we’re using as front ends and it’s quite tempting to replace one of them with the Mini. There are still some details to be worked out because, for one, the remote controls we have aren’t supported under OS X, and for another, MythTV loses keyboard focus from time to time which gets really old really fast.

The Mini has been told to wake up from sleep at 4pm and to go back to sleep at 6pm, giving iTunes a sufficiently large window to fetch whatever new episodes may be available (it’s been told to check hourly), so that they are there later on in the evening.

A problem is that the printer/scanner, downstairs, is no longer hooked up to any computer. I don’t really want to move it into the dining room and create more clutter there and I don’t really want to keep it inoperable for too long, so I’m checking my options:

  • Move upstairs, hook up to the (kids’) dining room computer.
  • Pick up another Airport Express from Apple and hook it up wirelessly.
  • Put Mac Mini into the living room and somehow let it take the place of the Airport Express, which can then be used for the printer?

I realize it’s a bit of a luxury problem but I’m open to suggestions. πŸ™‚

2007/1/5

2007

Filed under: Family,Projects,Software — Erwin @ 2:42 am

I’ve been fairly busy in the past month, as has shown itself in the lack of substantial posts here, mostly just coasting along.

On the family side of things there was the wrapping up of M‘s home improvement project (the living and dining room, which caused quite a few things to overflow into the hall, the kitchen, the front porch, etc).

On the work side I had a massive project on my hands to work out a solution for migrating away from the fairly customized version of DGD that we use. This resulted in an upgrade process that touches over 60 files with code, at least 3 restarts of the game/server and about a dozen fairly distinct steps involving compiling and recompiling code and patching data in objects all over the place. I’ve done that for 4 of the servers now, still half a dozen to go.

I typically laugh at new year’s resolutions, but for 2007 I have two that I really want to work on:

  • Keep track of (all) our finances again.
  • Work hard(er) on keeping our house clutter free.

I used to keep track (on and off) of finances using GnuCash but then I switched to OS X and to run that there I have to install X11 support and either run it locally (which looks like a royal pain) or run it remotely from one of the headless Linux machines, which is less than ideal as well. So instead I’m looking into native OS X applications.

The one I’m trying out right now is Moneydance, software that has versions for Windows, OS X, OS/2, and various unix platforms. It helps that all these platforms support Java. πŸ˜‰ I like the setup, but haven’t figured out yet how to get online banking to work for the credit card and bank accounts of ours that are supposed to be supported. Not a show-stopper as just about all of them support downloading statements in OFX or QIF form, which can in turn be imported.

The war against clutter has been going on for longer and we were making some decent headway, but the home improvement projects and a few other external factors caused some setbacks. Last week we worked really hard at getting the main rooms (living, dining, kitchen, hall, bath) in shape and now everybody is on the same page again to keep it that way.

Wish us luck!

2006/9/19

Bacula scripting

Filed under: Projects,Software — Erwin @ 10:08 pm

I’ve been using Bacula for a year or two now, I think, and the one thing that had been irritating me for most of that time is that every morning I’d be presented with X emails, one for each machine that’s been processed and another for the backup of the catalog itself, and have no idea at the end of it how much had changed (and backed up) on which machines, and where any anomalies might have occured.

So I began work on /etc/bacula/scripts/summary.pl, with the intention of emailing me its output and, no longer needing them, automatically filing away those individual Bacula reports marked as read in a folder where I could dig them up for closer inspection if necessary.

I use the SQLite back-end, but it is trivial to adjust it to a MySQL back-end, for anyone who’s worked with DBI before.

You can glance at source code and use it as you see fit (if it breaks, you get to keep both pieces, you get the idea).

The basic plan is to either run it as Run Before script in a separate administrative job with a sufficiently low priority that it runs after the catalog backup, or to run it as a Run After script in the catalog backup job itself. Either way it may not run as root so make sure you put the summary.stamp in a location where the Bacula running user can read and write.

The output will look like this:

Summary of jobs finished since Mon Sep 18 03:53:04 2006:
Job  Name            End Time        Size     Files   Err Miss Status Level
3490 JobName1        09-19 03:15:13    147 MB    2224   0    0 T      I (B)
3491 JobName2        09-19 03:16:58     37 MB    3502   0    0 T      I (B)
...
3495 JobNameN        09-19 03:22:43   1091 kB      84   0    0 T      I (B)
3496 BackupCatalog   09-19 03:48:10    187 MB       1   0    0 T      F (B)

Ideas for improvement are to separate the failed jobs (the ones with status f) from the rest, or to squeeze even more information into it, but for the moment I’m sufficiently happy with this leap forward that I’m giving it a rest. There are always other projects that could use my attention, after all.

2006/9/2

Tiny URLs

Filed under: Projects,Software — Erwin @ 2:49 am

As an aside:

When using Firefox, or any other browser which supports such a thing, you can add a quick-search bookmark with the following properties for easy use:

Name it.is-here.com
Location http://it.is-here.com/cgi-bin/magic.cgi?action=add&url=%s
Keyword url
Description Type “url <some url>” to be presente\d with a short-cut url.

So when you’re on a page with an annoyingly long URL you can then simply go to the location input, insert url before the actual URL and hit enter, which automatically sends you through the process of generating a short-cut. Can’t make it much easier than that, I think.

Enjoy. πŸ™‚

Update: Alternative (and more generally useful) approach, pointed out by Kalle:

Go to it.is-here.com
Right click in the “Add a url” input field, to get the context menu.
Select β€œAdd keyword to this search” from that menu.
Type something in for the name field and “url” in the keyword field and hit enter.

I learned something new today, yay!

2006/8/29

Tiny urls

Filed under: Projects,Software — Erwin @ 2:08 am

Ah, the story of the internet.

  • Boy writes piece of software.
  • Boy has some fun with it, and provides it freely on a website.
  • Boy nearly forgets it’s there, and just lets it run for a few years.
  • Spammers/scammers find it and decide to abuse it.
  • Boy finds out and has to decide whether to pull it entirely, or to put in measures to prevent future abuse.

In this case the boy is me, and the software/website is it.is-here.com, a tiny-url service that I wrote purely for the sake of figuring out how to do such a thing at all.

Today, during a routine check, I noticed there had been more traffic than usual on the website and investigated. I found that a few dozen codes/URLs had been added that redirected to sites in the make money fast and generate ad-clicks categories, in an apparent attempt to obfuscate their target/purpose.

After first adding a delete option to my administrative interface, which I had never needed before, and adding a disclaimer to the page, I decided to give them a piece of their own medicine, and redirect attempts to use non-existing codes towards a page with some Google ads. Hey, if I get a few clicks on it, great. In the time that I did use them it never got me enough clicks to even warrant a single payout (there’s a $100 threshold and I never even got near it), maybe these tricksters can help me out!

All non-tricksters are still invited to use it, of course. πŸ˜‰

2006/6/24

Static Pages (2)

Filed under: Projects,Software — Erwin @ 6:43 pm

There we go, I finished polishing it enough to call it a 1.0 product, and created a page on which to make it available to the world.

Go me, or something. πŸ˜‰

Update: 1.1 now in place.

2006/6/23

Static Pages

Filed under: Projects,Software — Erwin @ 2:58 am

Cool. I wrote my first WordPress Widget this evening, to display the static pages the way I prefer, after eyeballing the ones that came with the Widget Plugin itself. Not bad, if I may say so myself. I’ll make the code available after I’m finished polishing it (adding all the options I can think of, even if I don’t use them myself). πŸ™‚

2006/4/13

That sucked (2)

Filed under: Humo(u)r,Projects,Technology — Erwin @ 6:13 pm

Is something going screwy with companies using FedEx this week? I’d been checking the Maxtor website to see if the replacement for my to-be-RMA’d HD was on its way yet and on last check (somewhere yesterday) it was still being prepared for shipping or something along those lines. You can imagine my surprise when I found a little package on the front porch this morning with that same replacement HD in it! A pleasant additional surprise was that it was a 250GB version to replace my faulty 200GB disk. No complaints here about that, though. πŸ™‚

Another thing going lopsided was a wireless card I’d ordered this weekend, which (also unexpectedly) showed up yesterday morning but for which the website at that point still claimed the item had been sent to the warehouse and no tracking number was available. This afternoon I received a kind automated email saying that the item had been shipped and would be on its way now. Yay! Does that mean I get another one? Nope, upon checking the website the FedEx tracking number turns out to be that one that arrived yesterday. Oh well…

You can now go back to your regularly scheduled time-traveling, folks.

Older Posts »

Powered by WordPress