Posts

Showing posts from June, 2008

Perceptions of foreigners and the US drinking culture

Quote of the Day 2008-06-07

I'm glad I'm from Taiwan, so I don't have to play drinking games every weekend.

- WY

iPhone presence indicator for your website

You can add presence indication to your website, i.e. it tells people whether your phone is on or not. This works for any phone that can check mail on a automatically.

Procedure:
1. Set up a mail server (apt-get install solid-pop3d)
2. Create a user on the system and set up your phone to access that mailbox
3. Have your website poll a file that the mail server will touch (/var/lib/solid-pop3d/bulletins/)

Example:
http://phor.net/personal

----

Notes:
- Makes sure your filesystem supports atime for /var
- update-rc.d solid-pop3d defaults
- sample code:

$stat = stat('/var/lib/solid-pop3d/bulletins/');
if (time() - $stat[8] > 20*60)
$news[] = array('title'=>'Phone', 'cite'=>'http://apple.com/iphone', 'desc'=>'My iPhone is off (it was last on '.reltime($stat[8]).')', 'date'=>time(), 'icon'=>'phoneoff');
else
$news[] = array('title'=>'Phone', 'cite'=>'htt…

Illegal photo you shouldn't be able to take from LeBow

Image
Me and AD