Saturday, April 14, 2012

GitLab - a private github-like solution

I'm always looking for new solutions in the private code and project hosting category. I recently stumbled upon GitLab, which seems to me like an awesome piece of software. The feature set feel a bit like github, which is very cool. The installation is a bit tricky, as you need to set up a full ruby on rails stack. The requirements talk about ruby 1.9.2 or greater, which demands a custom build on Debian 6 (which my private server run on) or the use of rvm. rvm made some trouble when I tried to use it so I switched to the custom build. The rest of the installation manual runs like a charm, really just copy and paste.

I took the nginx version using the unix socket. The only glitch in the manual is the name of the unix socket in the upstream {} block. This is set to /tmp/gitlab.socket, but it means /home/gitlab/gitlab/tmp/gitlab.socket.


One of the key features, from my point of view, is the permission system. It is not very fine grained, but educated enough to visualize e.g. customer-client relationships or help you to manage your university courses when you give your students some programming homework.


To get an impression of the UI and the features you can take a look at their homepage and their demo. The project's code is hosted on github

Sunday, April 8, 2012

Xubuntu 12.04 on my Sony Vaio VPCS13V9E

This is my installation report about installing the new Xubuntu 12.04 beta 2 on my Sony Vaio VPCS13V9E/B. This is the fourth attempt to install a different linux distribution on my Vaio. Before Xubuntu 12.04 came Linux Mint 12, which was a total failure, and Fedora Core 16. The SELinux seemed contra-productive for a developer notebook to me. Ubuntu 10.10 and 11.04 were total failures, too. The EDID, needed for the graphics, were not present and had to be extracted on a windows machine. The text-based installation was the only way to cope with the problem.

Now comes (X)ubuntu 12.04, my personal highlight so far. I've used the default installation image, downloaded from the official website. I decided to use a classic CD, the attempt to use an usb key instead failed because it just did not boot from it.

The installation went fine and without problems, even the graphics were good to go. After the reboot I found a system with well recognized hardware. WLAN, Bluetooth, network, sound, touchpad with multitouch (two-finger-scroll) and nvidia graphics were all good. Even the HDMI port and the sound over HDMI worked properly from the start.

The problems left:

  • UMTS - The Qualcom Gobi 2000 is always a problem
  • Keyboard backlight
  • Adaptive screen brightness
  • Screen brightness controls
The Gobi 2000 problem is easy to solve, as long as you have the windows drivers at hand. The gobi card has to be initialized with the proper firmware for your carrier (mine is O2 germany, which I will use as example). If you have a windows dual boot, just copy the folder C:\Program Files (x86)\QUALCOMM to an usb key. Otherwise download the firmware from the Sony support website and install it via wine. In the QUALCOMM folder you'll find a folder named "Images", which contains  numbered subfolders (0-12) and a folder named UMTS. Now you have to find out which number is correct for your service provider (Mine is 6, I just google'd it and found it on the first result page). Create the folder /lib/firmware/gobi if it does not exist and copy the content of the UMTS folder and the content of the folder with you corresponding provider number to /lib/firmware/gobi.
The next step is to install the gobi-loader, which enables the system to load the firmware into your UMTS card. Use "apt-get install gobi-loader" to install it. Afterwards we need to make sure, that the kernel loads the modules on boot, which we need to get the dialup connection ready. Do a "sudo vim /etc/modules" and add two new lines "qcserial" and "usb_wwan" at the end of the file. Save it and leave vim. To test it without rebooting your notebook, put the hardware switch to it's off state and do a "sudo modprobe qcserial" and "sudo modprobe usb_wwan". Then turn it back on and type "dmesg" in your shell. You should see the QUALCOMM lines in the output. Go to your network settings. You should now be able to create a new mobile broadband connection according to your carrier settings. For O2 germany you need to discard the settings that are in the preset and enter "internet" as APN.
Please note that it will always take some time for the gobi loader to get the firmware into the card's memory. This means, that it will take 10-15 seconds for the connection to appear in the network manager.

The keyboard backlight is eady to solve, too. Just edit your /etc/rc.local and add this line somewhere before the "exit 0" line:
echo 1 | sudo tee /sys/devices/platform/sony-laptop/kbd_backlight
This will enable the backlight. If you want to turn it off for any reason just change the "echo 1" to "echo 0".


The screen brightness stuff is still without a real solution. I'v read articles on the web that enable the brightness controls via the fn-shortcuts, but they are made of a bunch of custom scripts, which I did not check yet. The adaptive brightness has no solution known to me. If you find one, please leave a comment.

Follow up (April, 8th 19:32):
I've found a similar article dealing with another VAIO notebook on an older Ubuntu version (9.04). Unfortunately the hint regarding nvclock does not work on newer nvidia cards - they are not supported yet.

Tuesday, April 3, 2012

Git bash prompt


There are a few styles flying around the internet and I just wanted to contribute mine. It is based on the one I've found here: http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt - with some minor modifications:
  • The prompt's color scheme is made for white letters on black background
  • The path is shortened
  • Beside you branch the short sha1 of your HEAD is displayed
  • Replaced the time with user@host



Saturday, March 24, 2012

trivago + Neo4j = <3


I've already written an article about trivago's Mail-Pigeon project whilst it went open source a few weeks ago. For those who cannot understand the german language, I will try to do a management summary here.

The trivago developer days gave birth to a project named "mail-pigeon", which was meant to replace some of our PHP mailing processes. Beside the fact that we've looked for a highly scalable sending solution (for which we choose RabbitMQ and a Java daemon at last), we needed some more transparency for seeing the market impact of our mailing process. This mostly regards to our newsletters.

trivago is a company which is fast, not only when delivering search result, but also in changing it's strategies for the market. This means a lot of changes and also may result in a completly different analytic view on the data we collect. A graph database seemed to be the most fitting solution for this challenge.

When we take a look at the data we want to store, the intention to store it as a graph gets clear:
  • There are recipient groups and releated recipients
  • There newsletter, which will be sent to recipient groups and therefore to individual recipients (we connect the group and each individually as they can be part of multiple groups)
  • We want to tag each newsletter and traverse it to reach the user (similarity matches for offering different new newsletters)
  • We want to track campaigns, which are connected via graphs to the recipients and the newsletters (which are also nodes)
  • We also could(!) track via a img-tag if the user has opened the newsletter. This is barely legal in terms of german law, but totally OK for other countries.
As you can see, everything can have a semantic relation to everything else. This is what makes graphs so damn cool and Neo4J just awesome.

The code is a mixture of classic Java and some easy Scala code, which was an attempt go speed up things a bit. Most of the Java code is written for the JDK 7, which is available on nearly every OS in the world at the time of writing. If this feels too bleeding edge for you, you might be right, but why should we write new software with yesterdays technology for the days of tomorrow?


Planning graphs is quite easy. Take the natural relationships between things and use them to model your data. We took the following as a basis. As the Neo4J manual supposes, all nodes named first are connected to a virtual root node.

This image shows a basic data model. It was created using the Neo4J Eclipse, which is downloadable on Neo4J's website. You can click on the image to view the larger version.




There are a bunch of other technologies that made this all possible. I truely want to mention the awsome Vaadin framework and RabbitMQ

If you are interested in contributing to the project, please have a look at the github repository and feel free to contact me via mail, twitter or what ever you may use.

Tuesday, March 13, 2012

Project idea: A release management tool using git


Using git for deployments is nothing new, but I wonder if anybody came to the idea to build a web based release management UI on top of git? I would think of it as something like webistrano for pure git stuff.

I would like to see these features in it:
  • Having a configurable blessed repository for each project
  • Having multiple target repositories (not only one per server)
  • The ability to read all available branches
  • push every branch to every selected server
  • checkout different branches on selected servers
  • enable grouping of server or repository locations for collective checkouts or push operations
  • enable post-checkout scripts (maybe as hook?) for selected repositories
Those are my personal key features it would need to make me happy. Anybody out there who saw anything like this or is willing to start an open source project to create it?

Tuesday, February 28, 2012

Fly pigeon, fly!


As announced before, the Mail Pigeon project is now open-sourced under the Apache 2.0 license. All sources are available at github and are waiting for your contributions!

Monday, February 27, 2012

The newsletter tool goes OpenSource


The newsletter tool I've described in one of my previous posts is on it's way to be open-sourced. trivago's Peter Vinnemeyer gave the final go this morning. The project will be licensed under the Apache 2.0 license and will probably hosted at github. We need to polish the documentation and some of the sources before we can finally start pushing it to github, which will take a couple of days.

I will publish the final date on this blog and via twitter.