Sunday, January 25, 2009

Google - SPF records and spoofing from Google Apps

If you receive email from Google either, or the myriad of domains hosted by Google eg Google Apps Premier, you can use the published SPF records to preventing unauthorised spoofing.

To find the current SPF record you can do

    $ dig txt
and you'll get
    ; IN TXT

    ;; ANSWER SECTION: 300 IN TXT "v=spf1 ip4: ip4: ip4: ip4: ip4: ip4: ip4: ip4: ip4: ?all"
If you have a mail server that doesn't have SPF record support, then you can use these IPs to control flow.

It is not possible by the way for a Google Apps customer on one domain to impersonate (ie spoof) another, since the backend email system prevents this.

Friday, January 23, 2009

OSX - battery not charging, charge level shows 98%

Here's a curiosity I came across.

If you have your battery monitor set to 'show percentage' sometimes the status will be 'charged' and you have the green light on the PSU connector, and sometimes the status is 'charged' (on time view, or a percentage less than 100% and still with the green light, indicating fully charged. Also in this situation the battery symbol will have the 'on mains power' symbol.

This is OSX's algorithm to not overcharge batteries. On a power state change eg connect power, sleep etc.) it checks the battery and if the battery is <>

Thursday, January 22, 2009

Android - adding Three APN for Internet

Android - adding Three APN for Internet.

The Android is supplied with T-Mobile APNs which is no good if you're on Three.

To get Three, go to Settings > Wireless Control > Mobile Networks (its right down at the bottom).

Press Access Point Names then press Menu and select New APN. Press in each field and set each like this:
    Name - three
    Apn -
    proxy - not set
    port - not set
    Username - not set
    Password - not set
    Server - not set
    MMSC - not set
    MMS proxy - not set
    MMS port - not set
    MCC - 234
    MNC - 20
    APN type - not set

And you should be set. While you're in there if you travel you might want to disable roaming else you're data bill will arrive in s shoebox! Unless you don't pay the bill of course ;-)

Wednesday, January 21, 2009

Squid on OSX - reload configuration

Squid on OSX - reload new configuration

If you use the Dans Guardian build of squid, the binary is installed into /opt/squid. If you change a config option then you can load the new configuration without stopping and starting:

    sudo /opt/squid/sbin/squid -k reconfigure

Put in your password and off you go

Tuesday, January 20, 2009

Android - Howto Mount USB on desktop or laptop

Howto Mount Android USB on desktop or laptop.

Its not immediately obvious how to do this.

You've connected your Android by USB, get the 'USB connected' message, and then the USB icon top left on the screen.

But no volume on your desktop.

What you need to do is to press and drag in the notification area, and select 'USB Connected'. It then asks if you want to 'Mount' or 'Don't mount'. Select 'Mount' to have the SD card mount on the desktop.

Sunday, January 18, 2009

OSX - showing Geo Tag Photos

If you've read my post on how to have Android geo tag photos, this one may be useful on how to see the tags and photo location in OSX.

Open the picture in Preview on OSX 10.5, and do apple-I, or from the Tools Menu select "Get Info". The info window opens, click the middle tab, and if the photo has geo EXIF data you'll see the 'GPS' tab.

Friday, January 16, 2009

OSX - The item [filename] cannot be copied because there is not enough free space

OSX - the item [-] cannot be copied because there is not enough free space.

OSX has been giving me this message copying 10Mb of files to an empty 512Mb flash memory card. So its unlikely to be correct, and its not very helpful.

I still don't know exactly why this happens, but one way around it is to copy the enclosing folder. So in my case copying to a card for a digital photo frame, I just copied the 'photos' folder, and they copied over no problem.

Some reports say that formatting the card on a real windows box in either FAT 16 or FAT 32 helps. If I get chance I'll try this.

Wednesday, January 14, 2009

Picasaweb - Private Album Option

Previously I had noted that Picasaweb only had 2 options for shared albums: listed and unlisted. Now there is a third option: "Sign-in required to view". The help page explains

    Select the 'Sign-in required to view' option to set the highest level of privacy for your album -- you specify who has permission to view it, and visitors must sign in to their Google Account to verify their identity. Anyone not included on the album's 'Shared with' access list will be unable to view the album.
Finally! Private albums!

Tuesday, January 13, 2009

Screenshot DVD OSX

Apple have disabled the usual command-shift-3 etc options to take a screenshot when you have DVD player running. If its your DVD of a home movie, or you want to screenshot something else and you just happen to have DVD player open, then this is rather inconvenient.

Fortunately Apple have also given us the ability to launch the screenshot utility from the terminal command line.

At its simplest you just do

    screencapture -i ~/Desktop/dvd.png
There are a ton of options. The basic syntax is "screencapture [-icmwsWx] [files]". Note that the switches are case sensitive
    -i capture screen interactively, by selection or window
    control key - causes screen shot to go to clipboard
    space key - toggle between mouse selection and window selection modes
    escape key - cancels interactive screen shot
    -c force screen capture to go to the clipboard
    -m only capture the main monitor, undefined if -i is set
    -w only allow window selection mode
    -s only allow mouse selection mode
    -W start interaction in window selection mode
    -x do not play sounds
    -S in window capture mode, capture the screen not the window
    -C capture the cursor as well as the screen. only in non-interactive modes
    -t image format to create, default is png
    files where to save the screen capture, 1 file per screen

You can do "man screenshot" to get more information.

Monday, January 12, 2009

Android Geo-tagging Photos, import into Picasaweb

The Google G1 Android can geo-tag photos using the built-in GPS. Excellent. To record the location in the photo, start the camera application. The press 'menu' then 'settings' and select "store location in pictures". Then the camera will put the GPS data into EXIF.

However its
very hard errr make that impossible to get the geo exif information into picasaweb.

First I wanted to check that the geo information had really been added to the file. I emailed it to myself, although I could also have enabled Mass Storage. Then I used the excellent EXIFViewer to check. Alternatively I could use Preview. Yes the data is there.

I uploaded using Picasaweb album uploader, directly from and from the picasa android application. Everytime the EXIF data never gets uploaded.

What about the brand new Picasa OSX application? Nope. Doesn't even show the data. As the help page says "This feature is not currently available in Picasa for Mac."

Great. Not!

Thursday, January 8, 2009

Howto Remove Blogger Header

Howto Remove Blogger Header. Maybe you already removed the navbar and maybe customizing the header by removing the border wasn't enough, and you just want to remove it completely.

Go to 'dashboard' and select 'layout' and then 'edit html'.

Scroll down until you get to the "#header-wrapper" section.

    #header-wrapper {
    margin:0 auto 0px;
    border:0px solid $bordercolor;
    #header-wrapper {
    margin:0 auto 0px;
    border:0px solid $bordercolor;
    display:none; /
and save.

Update: if you're using the new templates, do this instead.

Customize the Blogger Header

How to Customize the Blogger Header. One way is to remove the border, say if you have a big header image.

Go to 'dashboard' and select 'layout' and then 'edit html'.

Scroll down until you get to the "#header-wrapper" section:


    #header-wrapper {
    margin:0 auto 10px;
    border:1px solid $bordercolor;
    #header-wrapper {
    margin:0 auto 0px;
    border:0px solid $bordercolor;
    #header {
    margin: 5px;
    border: 1px solid $bordercolor;
    text-align: center;
    #header {
    margin: 0px;
    border: 0px solid $bordercolor;
    text-align: center;