Sunday, March 30, 2008

Picasaweb - automating inserting EXIF data into the Caption

I am mid building project, and its nice to use Picasaweb to show progress. What I want is that the time lapse sequence will have the EXIF Date as its Caption, because when you upload the taken data gets hidden on the right hand side of the album window.

To solve this I used iPhoto and EXIFTool from Phil Harvey.

First I imported into iPhoto, rotated and enhanced etc. Then I exported a month at a time into a named folder - each month would be its own album in Picasaweb.

Then I installed EXIFTool and ran the following command

exiftool "-exif:createdate>caption-abstract" *

Then I drag into the Picasaweb uploader, and upload to the correct album.

Job done!

Sunday, March 23, 2008

Backrub - when Google was a start up!

While troubleshooting a family members Huawei SmartAX MT882 supplied for the TalkTalk ADSL service, I came across some pages about Google's past as a startup.


Here's their _entire_ hardware setup!

And this is their Stanford paper

I never did find the firmware upgrade I was looking for!

TalkTalk ADSL Huawei SmartAX MT882 Connection Problems

If you have a Huawei router and you are experiencing dropping or intermittant connections, please check the colour of the link light on the router. If the link light is orange then you are connected to the TalkTalk service, if the link light is flashing green or off then the router is unable to synchronise with the exchange, please see the 680 error guide. If the link light is green, then please follow the below instructions to check if the modem is set to connect on data.
  1. Ensure the router is switched on and the power light is green. Check the appropriate leads are connected at the back of the modem. Open your web browser, i.e. Internet Explorer
  2. In the address bar, delete the current URL and depending on the connection of the modem as shown below, type in the appropriate IP address:
    • USB Connection –
    • Ethernet –
  3. You should now be asked for a username and password box, please ensure you type in below login details:
    • Username – admin (all lowercase)
    • Password – admin (all lowercase)
  4. Your web broswer should now display the Huawei homepage, click on 'Basic', then 'WAN settings'.
  5. You should now be able to click on the 'pencil under actions', this allows you to check and edit the router configuration.
  6. Near the bottom of the screen is an option for 'Status', with a magnifying glass, click on this. A dialogue box should appear for 'PPP Status'.
  7. Make sure 'Always on' is selected, click on 'Submit' and then 'Close'.
  8. You now need to save the settings onto the router, to do this click on 'Save all' and then 'OK'.
  9. Turn the modem off and then turn it on again. This should resolve the disconnecting if idle.

I also found out some other information.

The user manual for the MT882 can be downloaded from here.

You can use your own router with TalkTalk, although they state that doing so is unsupported.

The settings you will need are:

Connection Protocol: PPPoA (VCMUX or VCBASED)
VPI: 0
VCI: 38
(VPI/VCI): 0,38
Authentication: CHAP

Primary DNS server:
Secondary DNS server:

Alternative DNS Servers:
DNS Primary IP address is
DNS Secondary IP address is

Thursday, March 20, 2008

Using a Macbook / Macbook Pro with an external monitor and the lid down

Lucky me has a 24" monitor (OK its a Dell so not as lucky as I could be ;) , but I don't like having 2 monitors of different sizes.

For me its better to have the lid down and only use the external monitor.

Anyway I found this KB at Apple that says how to do it:

If you use an external display or projector with any MacBook Pro or PowerBook G4 and a USB mouse or keyboard, you can close the display and still use the computer. Here's how.

(If you want to do the same thing with a Bluetooth mouse and keyboard, see this article.)

1. Make sure the computer is plugged in to an outlet using the AC power adapter.

2. Connect a USB keyboard and mouse to your computer.

3. Connect the Apple video (VGA or DVI) adapter that came with your computer to the appropriate port on the external display or projector and turn the display or projector on.

4. With the computer turned on and your keyboard or mouse connected, connect the other end of the adapter to the video output port on your MacBook Pro or PowerBook G4.

5. Once your computer's Desktop appears on the external display, close the computer's lid.

6. Once the lid is closed, wake the computer up by either clicking your mouse button or by pressing a key on your keyboard.

You should now be able to use your MacBook Pro or PowerBook G4 as you normally would, using your USB keyboard or mouse.

To disconnect your MacBook Pro or PowerBook G4 from the display after use:

When you're finished using your MacBook Pro, MacBook, or PowerBook in closed-lid mode, the internal display will not function when you open the lid until you have properly disconnected the external display. To properly disconnect the external display, put the computer to sleep and disconnect the display cable from the computer. Open the lid and the computer reactivates the internal display.

Some DVI displays, including Apple's aluminum-framed DVI displays, can be unplugged without putting the computer to sleep. If you aren't sure whether your display supports this feature, put your computer to sleep before unplugging the display.

UPDATE: On some Macbook Pros the recent Graphics Update has a bug which prevents this working. Also if you disconnect the monitor you may find that the internal screen does not stay on. Apple say it is a known issue.

UPDATE #2: The 1.5.1 EFI firmware update fixes this issue. Now works fine!

Tuesday, March 18, 2008

Apple OSX - time does not get set automatically

Even though my laptop is on 3 or 4 hours a day, every day, I noticed that the time was still wrong by over 3 minutes. What gives?

The frequency that the NTP daemon checks is set in


and the default are

server minpoll 12 maxpoll 17

Also, OSX should work out how much the time drift and puts it in /private/var/run/ntp.drift but on my system this file has the value '0.000' which means OSX thinks there is no drift.

This means that with zero drift OSX will check the time every 2^17 = 131,072 seconds or ~36 hours. Even with some drift it will only check every 2^12 = 4096 seconds or about 1.5 hours.

So my quick solution is to change /etc/ntp.conf to

server minpoll 6 maxpoll 12

which increases the frequency of time checks.

Monday, March 10, 2008

Apple Mac OSX, Squid and Scansafe

The Scansafe service does not not formally support using squid as your traffic concentrator - they would rather you use the Connector. The Connector of course is Windows only which if you don't use Windows is bad, also the Connector sends the user information as extra encrypted header detail, which is good.

So if you don't use Windows then you can use Squid as your concentrator, but user information (because Sansafe is granular to user level so you want to have user-based and groups based policies) is sent clear.

If you can live with this, then you'll need to modify your squid.conf file.

Heres mine (NB lines may be wrapped):

cache_peer scansafe.tower.ip parent 8080 7 no-query no-digest no-netdb-exchange login=*

scansafe.tower.ip - is the tower Scansafe tell you to use
parent - you can choose parent or sibling or multicast. Only parent applies
# 8080 - is the port Scansafe use
# 7 - in theory this is not required because we're not doing the ICMP query, but for some reason you need it
# no-query - means squid will not use ICMP query to see if the next hop is available
# no-digest - again goes with not using ICMP
# no-netdb-exchange - this goes with the no-query setting
# login=* - this passes your user details through. Username only, not password!

cache_dir ufs /opt/squid/var/cache 100 16 256

# you'll notice the non-standard structure here. Its due to installing squid on OSX

auth_param basic program /opt/squid/libexec/ncsa_auth /opt/squid/etc/squid_pwd

# this is for the authentication routine. ncsa_auth only support basic clear text so you will see the passwords passing over the wire. The presumption here is that this is for a small network, like mine.

acl no_auth_required dstdomain "/opt/squid/etc/no_auth_required
http_access allow no_auth_required
acl ncsa_users proxy_auth required
http_access allow manager localhost
http_access deny manager
http_access allow ncsa_users
http_access deny !Safe_ports
acl BadSites dstdomain "/opt/squid/etc/bad-sites.squid
http_access deny BadSites
acl no_scansafe dstdomain "/opt/squid/etc/no_scansafe
always_direct allow no_scansafe
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow allowed
http_access deny all
always_direct deny all
never_direct allow all

# All these options allow me control of what is passed to Scansafe, and what sites require authentication. For example, I don't mind access to the Apple updates sites. Likewise if a site s not accessible under any circumstances, then I add it to BadSites.