Setting up Tweet Nest in Nginx

Today I've set up Tweet Nest at tweets.tenzer.dk. Tweet Nest is a simple application which archives all your tweets, and makes it easy to search for old tweets you've written that you might want to find again. Tweet Nest comes by default with .htaccess files containing a Apache mod_rewrite specific configuration, but since I'm using Nginx that configuration won't work for me.

The mod_rewrite rules a limited to rules for handling requests to /sort, /favorites, /search and pages to show tweets for a specific month and day. In the .htaccess file they are specified as:

RewriteEngine On
RewriteRule ^sort/?$ ./sort.php [L]
RewriteRule ^favorites/?$ ./favorites.php [L]
RewriteRule ^search/?$ ./search.php [L]
RewriteRule ^([0-9]+)/([0-9]+)/?$ ./month.php?y=$1&m=$2
RewriteRule ^([0-9]+)/([0-9]+)/([0-9]+)/?$ ./day.php?y=$1&m=$2&d=$3

I have replaced those with the following Nginx rules, which are specified within the server {} directive for tweets.tenzer.dk:

rewrite  ^/sort /sort.php;
rewrite  ^/favorites /favorites.php;
rewrite  ^/search /search.php;
rewrite  ^/([0-9]+)/([0-9]+)/([0-9]+)? /day.php?y=$1&m=$2&d=$3;
rewrite  ^/([0-9]+)/([0-9]+)? /month.php?y=$1&m=$2;

A few things to note:

A fun thing, if you try to find my first tweet, you will see that the oldest tweet in the archive is dated to October 13th, 2001 which can't be right, since Twitter didn't launch until 2006. It must be Twitter who got it wrong in their database, because that's also the date shown on their page for the tweet.

Football pictures and video

A few weeks ago I watched the Copenhagen Towers (the American football team I play for) U19 team play the semi-finals in the national championships, and I did of course take pictures of it. They can all be found in the Flickr gallery for the game.

Tuesday this week the Jens Rørbye the media manager for Copenhagen Towers, contacted me and asked if I could help out with an interview of the teams American import quarterback player. The news was that the player has renewed his contract for another season, so the interview was about that and living in Copenhagen.

Read more

The only thing worse than ads on websites

You have probably experienced it as well. You go into some website you rarely visit or haven't visited before, in order to find some information you know is on the website. For me it is typically a government owned website, or a website supported by a government body.

The page loads and you are getting ready to find the information you need, and then after quarter of a second a popup window comes right up in your face. The popup window wants to know your opinion about the website and how easy it is to find information on the website. The problem is, how should I know this if its my first time visiting the website, or I only visit it once per year?
Also, why is it the people behind the website can't use some of the existing extensive statistics gathering tools for websites in order to analyze how people navigate around their website, and if the users come back to their website. I guess they are just to lazy to analyze their statistics, and thinks it's easier to just bug their users to give them feedback.

Do anybody know of a Adblock Plus filter to block out these services?

Unsubscribing from newsletters…

A message I have seen numerous times when unsubscribing from various newsletters, is "Please allow up to 10 days for the changes to take effect in emails you receive.". How is it even possible to create a system that takes 10 days in order to remove an e-mail address from a list or a database, or change a flag which states if I should receive their news letters or not?

Concert photography is fun!

In an attempt on getting a bit of activity back here on my blog, I thought I might as well update a bit on what I've been doing lately.

A few weeks ago I went to the concert venue Gimle which is located in Roskilde in order to watch some concerts, primarily with the Danish live drum and bass band F.U.K.T and electronic artist Rangleklods. Both artists were ones which I had listened to a fair bit prior to the concert, and the concert was free so it was really a no brainer to go.

Read more

keep looking »