on Tuesday, August 28, 2012
Today I had to use Redis for the first time which doesn’t seem very well supported under Windows at this point. Coming from Linux I try to use Cygwin under Windows as often as I can. So here is what I did to build the latest Redis version (there were some old binaries for download but I wanted to use a newer version). First make sure you have the Cygwin packages “make” and “gcc” installed. Then open a Cygwin terminal and follow the steps under “Installation” but do not run “make” yet. Before you run “make” open the file src/redis.c and add the following block somewhere on top of the file (I have copied it just one line before the #include statement):


This is a manual change which I found in this issue. Finally run “make”. Ignore the warnings. If all goes well, you should have a bunch of new .exe files at the end. redis-benchmark.exe, redis-check-aof.exe, redis-check-dump.exe, redis-cli.exe and redis-server.exe – copy them into the bin folder of your Cygwin installation and restart the terminal. To test execute “redis-cli -h <your-redis-server> -p <your-redis-port> ping” and hopefully get a pong back.
on Tuesday, August 7, 2012
Next week I'll be changing jobs inside EA. My time at Playfish will be over and I will be working for another studio in Stockholm. Playfish mail is running on the Google mail infrastructure. I am sure I won't be able to access my corporate mail account after I have left, so I thought it was a good idea to get a backup of all my corporate emails. One promising program is gmvault, which I found after stumbling upon an old Matt Cutts blog post about backing up Gmail on Linux yay. Matt is suggesting getmail to get the job done but the project seems to be dead since 2009.

I am running Ubuntu 10.04 Lucid Lynx. First I installed me a new virtualenv, which you should always do if you are required to install new pip packages (gmvault). Just follow these instructions to get started with virtualenv. Once you have your virtualenv activated run pip freeze, to check what packages are installed. If you created the virtualenv with the –no-site-packages option like me, there should be 2 packages distribute and wsgiref. Make sure the distribute package is at least in version 0.6.24. On my Ubuntu 10.04 I needed to upgrade.


Finally install gmvault in your virtualenv and run it.


First it will print some instructions for you. After pressing Enter a browser window is opened and you have to log into your mail account. You will be told that the program gmvault wants to access your credentials. Click accept. This will store a Gmail XOAuth token to your local disc, i.e. as /home/user/.gmvault/reik.schatz@old-company.com.oauth. This token is now used by gmvault to access your email account. Press Enter again and start the download. It took about 3 minutes for 1200 emails to be downloaded via imap. On a side note, if you want to learn more about imap and python, you should read this great book which I just finished.