SVN Branching as easy as Git

SVN branching is a little super painful on the command line. For all those who worked with git a single minute of their lives, it’s really frustrating. Floor Drees wrote a nice svn tutorial for git users. But it doesn’t need to be so complicated. This post provides handy bash aliases (they work on zsh, too) for easier svn branching, merging and reintegrating.

The SVN problems

Who can remember the whole repository URL which is in fact needed twice for creating a new branch?

Continue reading

Posted in General | Tagged , , , , | 2 Comments

Handling SNMP Counter32 overflows on HP1810-G correctly

Most network devices can be queried using SNMP nowadays. Luckily, even for a small HP 1810G-24 Switch, about 2000 SNMP OIDs exist – hooray for graphing.
One of the most interesting graphs on a switch is bits in/out on each port.

The HP 1810G-24 switch does not support Counter64-types for octet counters. This post introduces a middleware to fetch the Counter32-types fast enough to build a software Counter64 object to display the correct bandwidth in a munin graph.
Continue reading

Posted in Python | Tagged , , , , , , | 1 Comment

Benchmarking inside virtual environments (Time is relative)

A reliable time base is needed for successful benchmarking. But what if the system’s time is correct in an absolute way, but not in a relative way? During my evaluation of different virtualization techniques I found some strange results – nearly four times the performance inside a VM on VirtualBox vs. the native performance of the host!

 

“Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. That’s relativity.”  Albert Einstein

Continue reading

Posted in General, Python | Tagged , , , , , | Comments Off

Automate your shell scripts using inotify and inotifywait

Everybody has some utility scripts and bash lines which help in the daily business as a developer.
Imagine a life without “Remove all .svn directories from a path“, “Find duplicate files and remove them“ or “Watermark a PDF file”.
How about a script which does this automatically? How to write a poor man’s IFTTT in a few lines!
Continue reading

Posted in General | Tagged , , , | 12 Comments

How to build a special purpose browser

Ambition
One of our bravest customers, Mathias Frey from WU Vienna, is in charge of all new public IT-services for the brand new WU-campus in Vienna. His recent projects (among some fantastic others) was to provide public surf-stations: here’s Mathias’ story where he got inspiration for the new stations. The challenge with this terminals is, that it should only provide full internet access if the user is authorized via his student ID (read: a MIFARE smart card) or a username/password combination. This is were he called us and told us his idea about building a custom web-browser: lovingly called Dorfbrowser.

How we’ve done it:
If you want to reach development goals fast, Python is your friend – and so is Qt. Qt can be used directly in Python via PyQt bindings. What’s missing is a fully functional web browser: WebKit directly integrates to Qt and makes it the perfect combination to build a custom web browser. What you’ll get for free is total independence of the target deployment platform.

A simple library for accessing the necessary information from the students’ smart card has been found with RFIDIOt. Whenever an authorized card is wiped over the contact-less card-reader the browser mode changes to unlimited internet access. Limitation of internet access is implemented through two different proxy servers – one only allows access to the university network whereas the other one allows full access to the internet.

Another cool thing is the easy way to support Adobe Flash: since WebKit is compatible with Netscape plugins (npapi) the only thing to do on Ubuntu is to install Adobe Flash and activate plugins for WebKit by setting an attribute. This also theoretically works for all other plugins that provide a npapi interface.

QtWebKit.QWebSettings.setAttribute(
                 QtWebKit.QWebSettings.PluginsEnabled,
                 True)

Simplicity
It’s amazing how simple it is to build a fully functional browser with history and tab support, fullscreen mode, authentication via username/password (LDAP) or NFC-smartcard. Creating UI components with QtDesigner and PyQt to enrich them with functionality is not only easy but real fun.

Browser with limited access

Browser with limited access

Browser with full internet access

Browser with full internet access - user is automatically logged off after 90 seconds of inactivity

 

What’s missing for full kiosk-happyness:
The next step is to lock down the host OS to prevent normal users to do unintended things. An excellent step-by-step recipe can be found here: http://www.alandmoore.com/blog/2011/11/05/creating-a-kiosk-with-linux-and-x11-2011-edition/.

Do you need detailed information about implementation details: Don’t hesitate and get in touch with us – just leave a comment – we’re happy to help!

Posted in General | 3 Comments

Usersnap gets a new blog!

Usersnap, a tool to get visual feedback from your website is growing rapidly – so we’re excited to announce, that Usersnap got its very own blog! We’ll post about new product updates and examples how you can utilize Usersnap for your web application. Looking forward to seeing you there!
http://blog.usersnap.com

Posted in General | Comments Off

My favourite python easter-egg

Try it!

import this

If you are curious and don’t have a python shell near to you: Python PEP-20/

Posted in Python | Tagged , , | 1 Comment

Usersnap launch!

Today our new product, Usersnap has been launched into private beta!
Usersnap is a visual feedback tool. Just add some lines of JavaScript to your webpage and your visitors can send you annotated screenshots of your webpage. It’s perfect for testing / going live of a new webpage. Immediately after a user notices an issue, he/she can send a screenshot without using external tools.

There is no need to install any plugins (no Flash, no 3rd party Javascript needed) and it’s completely asynchronous (it does not slow down your page in any condition).

Please test it (either on usersnap.com or directly here in the lower right corner) and feel free to request a free private beta account!

Posted in General, JavaScript | Tagged , , , , , , | Comments Off

How to send text messages using Python and a modem

At La Gentz we love to monitor our servers and services. We also love all the fancy warning e-mails if something is going bad at our server room.

Recently we realized, there’s a single issue we can’t get warned by e-mail: The breaking of the interwebs in our office (i.e. our main router crashes or someone accidentally unplugs the red cable)

This is fixing the internet

Continue reading

Posted in General, Python | Comments Off

Using the Kinect for public User-Interfaces on Ubuntu Linux

The Microsoft Kinect is a affordable (around 100 EUR) device for natural interaction. I present a way to use the Kinect under Ubuntu Linux 10.10 (x64) as an input device for a browser remote control using OpenNI, Sensor Kinect and the NITE toolkit.
Kudos goes to Mathias Frey (Vienna University of Economics) for being cool enough to commission us with this cutting edge evaluation!

Continue reading

Posted in Python, User-Interface | Tagged , , , | 12 Comments