Remote-Controlling a Sonos Device Using Python

I couple of months ago I bought a Sonos Play:1, a pretty cool wireless speaker that comes with free controller apps for major platforms (Android, Windows etc.). To give the speaker access to my music collection, I hooked up a USB drive to my home router and shared the music via SMB, which works great.

Continue reading

Posted in linux | Tagged , , , | 2 Comments

A Template for Python Unix Utilities, Revisited

A long time ago, I posted a simple template for writing text-processing Unix utilities in Python. Since we’re not in 2009 anymore, I figured it’s time to port it to Python 3.

Continue reading

Posted in python | Tagged , | Leave a comment

Quick Tip #6: Triggering Actions on File Close

Sometimes it’s useful to trigger an action after a file is closed. Suppose you started a lengthy download on your notebook and you want to suspend it as soon as the download is done. There are several ways to achieve this.

Continue reading

Posted in shell | Tagged , , , | Leave a comment

Setting Up a SOCKS Proxy Using OpenSSH

Web browsing on a public Wifi network is a security risk as it’s quite simple to capture network traffic. Even if you only connect to SSL-protected sites, people can still find out which web sites you’re accessing. Fortunately, there is a quick way to protect your privacy – all you need is a host on the public network that you can access via SSH.

Continue reading

Posted in linux | Tagged , , | 1 Comment

Your Quick Guide to Promoting Technology

So you found an awesome new technology and it changed your life. Two weeks in and it feels like you’ve been taken from stone age to space age. Good for you, but better still if you can help others see the light. Thousands are still hacking away with substandard programming languages, libraries, and tools. It is your obligation to save them.

Continue reading

Posted in misc | Tagged | 2 Comments

Mirroring an Apt Repository

When setting up a Hadoop cluster using Debian packages, it’s often useful to work with a local mirror. In this article, I’ll walk you through creating an apt mirror for Cloudera’s Hadoop distribution.

Continue reading

Posted in linux | Tagged , , , | Leave a comment

Building a Web-Based Java API Search

From time to time I play with web technologies to keep up with recent developments. While I know my network protocols pretty well, I’m not a frontend developer so I’m pretty useless when it comes to JavaScript or CSS. I believe in learning by doing, so I decided to build a simple web-based search for my most often used Java APIs.

Continue reading

Posted in misc | Tagged , , | 2 Comments

Setting Up a Web Proxy with Squid

Setting up a Squid forward proxy can be a pretty daunting task since Squid is an extremely flexible piece of software. In this article, I’m going to provide a minimal non-caching, authenticated configuration. I have tested this with Squid 3.1.12 on Ubuntu 13.04, but with minor adjustments it should work for other systems as well.

Continue reading

Posted in linux | Tagged , , | 2 Comments