"The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt." -- Bertrand Russell

latest blog entries

tweets (@s0enke)

Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

blog

Tue

03

Apr

2012

puppet-rspec debugging

While introducing rspec-puppet into a big and grown puppet codebase at Jimdo we needed to debug stuff and get more verbose output while writing the first tests. As the interwebs aren't very chatty about the topic, here for all the distressed googlers:

read more 0 Comments

Sun

17

Oct

2010

devopsdays in hamburg

read more 0 Comments

Mon

11

Oct

2010

mysql prompt tuning

mysql> prompt (\u@\h) [\d]>
PROMPT set to '(\u@\h) [\d]>'
(debian-sys-maint@localhost) [cms]>

persistent in bashrc:

 

export MYSQL_PS1='(\u@\h) [\d]> '

 

read more 0 Comments

Sun

11

Jul

2010

rdiff-backup: the easiest way to backup (and restore)

Today I finally managed to set up an incremental backup for my workstation. What do we need? Well, nothing more than rdiff-backup, an opensource command line tool with all the powers you need.

 

it just backups. and your last backup is always available 1:1 at the destination (no strange storage formats etc., just dirs and files). Diffs and metadata are stored separately. So if you want a backup that does its job, is plain, is easy to restore, has no unneccessary features and "just works" than rdiff-backup is the right tool for you.

 

Here a small bash script I write to accomplish the mission:

#!/bin/bash
P=/home/soenke
DESTINATION=mydestionationserver.local
INCLUDE="
$P/Documents
$P/.gnupg
"

echo "$INCLUDE" | rdiff-backup --include-filelist-stdin --exclude $P/ $P/ $DESTINATION::/home/soenke/backup
read more 0 Comments

Mon

24

May

2010

Integrating Google SSL Search into your Firefox Searchbar

Google search is now also possible via SSL. If you are paranoid like me you might wanna have it enabled by default - while there are several firefox plugins around there, here's how to do it on your own:

 

  1. Copy an existing Google Search Plugin XML into your Profile under "searchplugins" (maybe the diectory has to be created first). In Ubuntu for example it's placed /usr/lib/firefox-addons/searchplugins/<your locale>/google.xml
    Your own Firefox Profile is located in $HOME/.mozilla/firefox/<Profile Name/ (Ubuntu).
  2. Edit the freshly copied google.xml within your profile, change the ShortName to e. g. "My SSL Google" and <Url type="text/html" method="GET" template="http://www.google.com/search"to
    <Url type="text/html" method="GET" template="https://www.google.com/search">
  3. Restart Firefox and switch to your new own Goodle Search Profile (the scrolldown thingy with wikipedia, google, yahoo etc.)

This tutorial is also valid for other OSes, but you may have to find the appropiate locations / directories yourself ;)

 

I've been using my own google search xml for ages anyway to change the default language to english because it's annoying to have auto-geo-autodetected language search results everytime esp. if you search for technical things most of your time (Yes you could also set your preferred language in google, stay logged in all the time, let your cookies survive browser restarts etc, but that's no option for me). To accomplish this, just add a param line to the xml file like this: <Param name="hl" value="en"/>

read more 0 Comments

Sat

09

Aug

2008

PHP: SortingIterator

I just had the need for an Iterator that can sort itself by a user defined callback.

 

My special use case is that the DirectoryIterator of PHP does not sort the file list so it's pretty random. But my program logic relies on files being sorted by filename.

 

So here's the little class:

read more 0 Comments