I tried to program a very simple game (in Python) using the wonderful Monome interface (along with libmonome as software library).

My daughter really seems to enjoy it. Hopefully there are more games to come 😉 .

December 3, 2014 Development, Family, Fun, Linux, My Life

I finally found out how to allow an automatic login in WordPress via a given URL. This can be useful in order to keep some of your blog posts/pages hidden from the public, however, you still can share them with friends and family via a simple link.

  1. Create a subscriber user.
  2. Install the plugin WP Admin No Show – you can configure the plugin to block access of subscribers to the WordPress admin backend.
  3. Place the following snipplet of code into some file on your server (e.g., wp-autologin.php) and make an include ‘PATHTOFILE/wp-autologin.php’ in the functions.php file of your favorite theme:
<?php
function auto_login() {
        $user_login = $_GET['login'];
        $secret_token = 'SOMESECRETTOKEN';
        $loginusername = 'asubscriber';
        if ($user_login == $secret_token) {
                //get user's ID
                $user = get_user_by('login', $loginusername);
                $user_id = $user->ID;
                // let user read private posts
                if (!$user->has_cap('read_private_posts')) {
                        $user->add_cap('read_private_posts');
                }                                                           
                //login
                wp_set_current_user($user_id, $loginusername);
                wp_set_auth_cookie($user_id);
                do_action('wp_login', $loginusername);
        } 
}
add_action('init', 'auto_login');
?>

Now you only need to add ?login=SOMESECRETTOKEN to your url (e.g., http://blog.example.com/somepage?login=SOMESECRETTOKEN). Then, all posts marked as private will be visible to the particular subscriber account that you have created.

November 3, 2014 Development

During the Free and Open Source Conference (FrOSCon) 2011, I had the chance to give a presentation on the Dojo Toolkit, an Open Source JavaScript library that helps to ease the development of AJAX websites and Rich Internet Applications (RIA). At Univention, I am currently involved in a redesign of our extensive administration frontend for the Univention Corporate Server, our business Linux distribution. For this project, we strongly rely on Dojo in combination with a server backend written in Python :) .

You can find my slide at slideshare.net.

September 25, 2011 Development, Linux

I wanted to share a neat trick that I found to be working great for OpenOffice Impress presentations. I’m using the Presenter Console under Ubuntu, i.e. two screens, and wanted to show on mouse click videos at full screen resolution (on the video beamer screen, of course). In addition to that, I wanted to include videos with a relative path, i.e., relative with respect to the presentation (.odp) file. I finally managed to do this by writing a generic makro which calls a bash script that runs mplayer. For each video file in the presentation, I added an additional one-liner makro with the video path. Then, in the presentation, I would insert an image (e.g., sample frame of the video, but this can also be anything else, text, buttons etc.) and add a makro action (right click on the object or image -> interaction -> action at mous click = run macro) which would correspond to the makro containing the (relative) path to the video I would like it to play.

July 19, 2010 Development, Linux

We needed lately videos that were compatible with Microsoft Powerpoint. From what I understood it seems that Powerpoint supports natively only MPEG1 and WMV video codecs. After some testing I figured the options for mencoder in order to produce videos that would work with Powerpoint. Here the command line hoping that this might help other people in the future:

mencoder video.avi -o video.wmv -of lavf -oac lavc -ovc lavc \
-lavcopts vcodec=wmv1:vbitrate=1500:acodec=wmav1

Update: I added the audio codec, this should help to make audio work in Powerpoint. And thanks a lot for pointing out that file names (including the full path) should not be longer than 128 characters in Powerpoint.

September 11, 2009 Development, Linux

12
1 2