Google Hosted Mail Shared Contacts

I’ve set up another domain’s email system using Google’s Hosting for Domains, and got really excited when there was a checkbox labelled: Share User’s Contacts, thinking that I could set up an address book for one user, and share it among all of them. This was just what I needed for the organisation, which I help administer. However, it only adds the users to each other’s address books, not every user they add to their contacts…

Google Domain Pages

Whilst troubleshooting Gmail for Hosted Domains mail delivery issues, I came across Google Apps for Your Domain. It doesn’t appear on my Dashboard, but does on Jaq’s. It allows for publishing of web pages, stored on Google’s servers, under your domain name. I’m playing with it now.

Hosted Gmail and admin accounts

I’ve got hosted Gmail for both my domain, and my partner’s. It’s really good - much better than mydomain.com’s crappy email forwarding service, which seemed to fail every odd month. However, there is one caveat to take notice of. If you create a new account, and set it all up, including allowing POP access (which requires logging in, and agreeing to the ToS), everything works fine. If you upgrade this to an Administrator account, you need to log into this account again, and agree to the admin ToS, else you can no longer download mail via POP. Took me a while to figure this out…

Salary Sacrifice

I’ve had a loan laptop on more than one occasion recently, and I quite liked it. I recieved an email with an advert for salary sacrifice the other day, and did a bit of research. I’d prefer a MacBook, but the group I got the email from weren’t any cheaper than the Apple Education prices. Anyway, buying a $1700 laptop over 2 years would end up costing me only $15 per week, dropping down to $10 per week over 4 years. I’m due in a couple of months for a payrise of about this much, so I may do this.

Optical Illusion

From a trackback from Paul’s Time Sink, I came across a Spanish Castle optical illusion. You must see/do this, it’s truly excellent.

Steve Irwin

I’ve never really liked Steve Irwin. His over-exuberance annoyed me. When he nearly fed his baby to a crocodile, I felt like the rest of Australia was starting to feel the same way as me. Steve Irwin died yesterday, killed by a stingray. The man who scoffed at the danger of crocodiles was (apparently) only the second person in Australian history to die after a stingray-related accident. The stingray’s tail barb flicked up into his chest, and he died shortly after. The news programs on Australian television had created tributes to the man by the evening news, and the late news was almost all about Irwin. Apparently the morning programs were even worse. Having died young, killed by a creature he was filming, Irwin has cemented his place in the Australian collective psyche for a very long time. Going out with a bang has made sure he will stay famous. Of course, had Steve Irwin taken the advice of the anti-skin cancer groups, he would still be alive today. If he’d worn sunscreen, he would have been protected from dangerous rays…

Sudo Sandwich

If you get this, you are probably nearly as nerdy as me. If you don’t, well, I’m not going to explain it. Whoops, forgot to add where this came from: xkcd.

autoTorrent.py

I’ve written a bit of code that works to automatically start any number of torrents placed into a specific directory. The way it’s set up at the moment is that it will only start the next one on the list, and you need to call it iteratively to start all of them. That’s mainly because on my NSLU2 I get some CPU usage issues if I start more than one at a time. Just have this script called every 5 mins or so in a crontab, and it will start every .torrent added to the source directory. */5 * * * * root /path/to/script/autoTorrent.py I could make a resident version, that uses a time.sleep() to call the main function every 5 minutes. Then this could be added to the /opt/etc/init-d/ directory.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    #! /usr/bin/env python
    
    import os, time
    
    # Any .torrent file placed in $base/source will be downloaded.  
    # When it's complete, it will be moved from $base/work to $base/target
    
    base_dir = "/home/user/torrent"
    source_dir = os.path.join(base_dir,"source")
    target_dir = os.path.join(base_dir,"target")
    work_dir = os.path.join(base_dir,"work")
    
    torrent_cmd = "enhanced-ctorrent"
    torrent_args = "-S localhost:2780 >/dev/null &"
    
    def getTorrents(path):
        os.chdir(path)
        data = os.popen("ls -1 *.torrent").read()
        torrents = data.split("\n")[:-1]
        for i in range(len(torrents)):
            torrents[i] = os.path.join(path, torrents[i])
        return torrents
    
    def getNewTorrents(path, oldTorrents):
        allTorrents = getTorrents(path)
        newTorrents = []
        for each in allTorrents:
            if each not in oldTorrents:
                newTorrents.append(each)
        return newTorrents
    
    def startTorrent(torrent):
        os.chdir(work_dir)
        cmd = " ".join((torrent_cmd, os.path.join(source_dir,torrent), torrent_args))
        os.system(cmd)
        #print cmd
    
    def getRunningTorrents():
        # do'h, ps on nslu2 is broken.  Had to install procps.
        cmd = "ps axwwo command | grep enhanced"
        data = os.popen(cmd).readlines()
        runningTorrents = []
        for each in data:
            if each.split()[0] == "enhanced-ctorrent":
               runningTorrents.append(each.split()[1])
        return runningTorrents
    
    def startIdleTorrents():
        torrents = getNewTorrents(source_dir, getRunningTorrents())
    
        # since we get some CPU usage issues on starting several torrents at the same time, 
        # just start the first torrent in the list.  Then we can rely on the idea we'll
        # be called by a cron-job or something to start the next.
        
        startTorrent(torrents[0])
    
    if __name__ == "__main__":
       startIdleTorrents()

More Router Woes

I’ve finally installed my wireless router. I thought I’d do it now, even though at this stage I have no wireless devices. I did have some pretty serious troubles getting it all working. It uses a pretty straightforward wizard, but because my modem was set up to auto-dial, I wasn’t able to set it up initially. Finally, after resetting the router, and then the modem, and setting up the modem as a bridge, I was able to get the wizard to work. Tip: if your NetGear router has mistakenly identified the connection type as Static IP, or Dynamic IP, when it should be PPPoE, then you need to reset the router to factory settings to get it to work. You should also do this if you change connection type (ie, Cable to DSL, or vice-versa). This would have saved me heaps of time. Tip 2: don’t use a 7.5V supply if it should be a 12V supply. The router appeared to work fine, lights all came on and everything, but DHCP server didn’t run. Now to the problem I’m still having. The router has a DHCP server, but not a DNS server. So it gives out IP addresses, and reports the name of the device that has each IP address, but there isn’t a way to just visit a device by using that name. The modem-router setup I had previously did have a DNS server, which meant I could have each machine get an IP, and then use the name of the machine to connect to it. In the interim I’ve set up each computer with entries in the relevant hosts file (or equivalent), and I’ve given permanent leases to my machines. That will have to do.

Stupid Wireless Router

I’ve just had my wireless router delivered, and I wanted to set it up without disconnecting from the internet for now. But when I try to connect to it, I get forwarded to the netgear website. Pissing me off…