geo twittering – the twitter / maps mashup

On July 20th, 2009 | , | No Comments | Permalink

Sorry, but I need to do an extra post about the “geo twittering” I told you about yesterday. Why? Because it’s actually pretty cool.
At our first tours, we created the corresponding google maps after the tour. At our last tours, we used GPS trackers (Christain & Jan) and postet them as we have had an internet connection. But now in Anatolia, we dont expect to have internet so regulary. So we tried twitter:

Twitter is a service for friends, family, and co–workers to communicate and stay connected through the exchange of quick, frequent answers to one simple question: What are you doing?

But the most cool feature ist that you can update your status via mobile. Just send an SMS to a twitter number, and they update your status. You can also change your location, but you dont have a location history. To solve this problem, we use the status update as location history. So we try to send our GPS coordinates at least once a day (maybe more often) and a status upate (short roundup of the day) via mobile (have a look at my twitter page to see what I mean).

<technical stuff>
Now I’m grabbing the latest status updates via the twitter api, parse the result via regexp for the coordinates and the status message and create a javascript file where I write all the selected data into.
Christian includes this file into his OpenStreetMap map. And shows the data as points on the map.
</technical stuff>

Now you can go to this map and track were we have been today and the days before.
Including time/date and the roundup of the day. You can also switch between different layers (yahoo, bing or google maps) and select the view you like most.

geo twittering, it’s eays as this.

MySQL-Query: Howto select upcoming birthdays

On December 20th, 2007 | | 2 Comments | Permalink

In a recent software project I needed to select the upcoming birthdays of the
users. But now I detected a problem with the turn of the year. After some time
of researching and trying, I found a stable solution. For your convenience,
here’s the code:
SET @today = '2007-12-20';
SELECT
user_id,
birthday,
DATE_FORMAT(@today, '%Y') - DATE_FORMAT(birthday, '%Y') + IF(
DATE_FORMAT(birthday, "%m%d") < DATE_FORMAT(@today, "%m%d"), 1, 0) AS new_age,
DATEDIFF(birthday + INTERVAL YEAR(@today) - YEAR(birthday) +
IF(DATE_FORMAT(@today, "%m%d") > DATE_FORMAT(birthday, “%m%d”), 1, 0) YEAR,
@today) AS days_to_birthday
FROM users
HAVING days_to_birthday < 14
ORDER BY days_to_birthday ASC;

And you can easily extend it to limit the result to some specific ages. This is
very useful if you want only the big O coming up:
...
HAVING days_to_birthday < 14 AND new_age IN (10,20,30,40,50,60,70,80,90,100)
...

Seagull Urgent Security Fix

On May 31st, 2006 | , | Comments Off | Permalink

Last week, I informed the Seagull developer about an important security issue. The new Seagull 0.6.0RC3 contains a fix for this hole. For more informations visit this article.

Seagull is an object oriented framework written in PHP that focuses on best practices, clean code and reusable components. The core libraries are free for you to use in your own projects and a number of modules developed by the community are also available.

top