TannieSpace

geekery, drawing and then some

Posts for June 29, 2006

Sunrise and sunset in Remind

Yesterday I installed Remind after reading the article at 43folders.

I do like to know when the sun rises and sets, but somehow I couldn't get it to work straight away for Amsterdam, NL. The times were completely off. After putting a - in front of the longtitude it turned out fine.

Duh.

I put this in my ~/.reminders:

show sunrise/sunset
SET $LongDeg -4
SET $LongMin -55
SET $LongSec -6
SET $LatDeg 52
SET $LatMin 23
SET $LatSec 26
MSG sunrise at [sunrise(trigdate())],
MSG sunset at [sunset(trigdate())],
MSG next full moon at [moontime(2)] on [moondate(2)]%"%"%

Using postfix to get my shoppinglist per txt

My cell-phone provider lets me send messages to e-mail using txt and the reply will then come back to my cellphone through their e-mail to txt gateway.

This made me think of a setup where I'd send a message to my mailserver (txt message that gets forwarded to e-mail), requesting my shoppinglist. With all the new phones around a special phone e-mailaddress would also work.

First I activated the address by putting list@mydomain.com list in /etc/postfix/virtual and /etc/postfix/virtual-mailbox-maps

then I postmapped both: postmap /etc/postfix/virtual and postmap /etc/postfix/virtual-mailbox-maps (this step can wait till after the next one, but as it didn't really matter, why not straight away)

In the file /etc/postfix/aliases, I added: list: |/Users/tannie/bin/list.sh

This points the user 'list' to a script (the | puts it through) in my ~/bin directory called 'list.sh' View the content of that script

Anything else than 'list' will ofcourse work as an alias, you'd just have to set it up like that.

If I send a message to 'list+shop@mydomain.com' with the subject 'list @supermarket' it'll send back a message with the body:

potatoes @supermarket
 milk @supermarket @farmer
 eggs @supermarket

The script will only allow listing, it does pretend to 'do' things if you make the subject 'do 3' or something like that, but due to rights it won't actually do it. I don't mind, I just need it for listing anyway.