Pavol Rusnak #cypherpunk #hacker #openhw #privacy #bitcoin #newmediaart

Global Game Jam 2012 - Hexoboros

Last weekend I attended Global Game Jam, more particularly its Prague chapter called Game Jam Prague. The original plan was to join my friends from Hyperbolic Magnetism like the last year, but they managed to grow their team to 7 people, at which point I decided to split and form my own team. :-)

The theme selected for this year’s edition was Ouroboros.

img

At first I created one concept, but later I realized it’s just a toy and it would be very hard to turn it into a playable game, so I decided to scratch it. Then I got the idea to create a puzzle game played on similar board like Hexxagon, but instead of individual stones you have 2-6 snakes and your objective is to move and/or rotate them in order to create one big cycle consisting of all of them.

This is how the game looked immediately after the contest (YouTube video).

img

I was very surprised that I won the second place with this game in the local competition, because all entries were great and to be honest I did not expect it. Thanks for your support!

img

img

img

If you want to try the game for yourself you can either checkout the source code or download a ZIP or TAR archives. After that make sure you have the latest LÖVE engine installed and run start.bat (Windows) or start.sh (Linux/MacOSX).

If you want to help me with the levels, just create the level file in levels folder (for example 14.lvl) and select level 14 in the level chooser. For level definition see file format.txt in the same folder. Thank you!

Photos by DubGame TV.

Getting SSH fingerprints for machines in your network

Some time ago we were trying to get SSH fingerprints for all machines in our local network. Solution is not that straightforward, but it’s not a rocket science either:

#!/bin/bash
tmpfile=$(mktemp)
for i in $(seq 2 254); do
    ssh-keyscan -t rsa,dsa,ecdsa 192.168.1.$i >> $tmpfile
done
ssh-keygen -l -f $tmpfile
rm -f $tmpfile

First, we retrieve the keys using ssh-keyscan, store them into temporary file and compute fingerprints afterwards using ssh-keygen. Or is there a less complex and more elegant solution?

PS: Thanks David for kicking in the right direction.

openSUSE Conference 2011 is coming ...

… and I’ll be there again as well! I guess there’s no need to tell I am really looking forward to it.

prusa-mendel

I’m pretty excited when I look closer at the just published Conference Timetable. What I really like about the openSUSE Conference is that it has also sessions that are not directly related to SUSE or Linux in general. You can “geek out” about topics like Digital processing of early color photography, Open Street Map, 8-bit Music, Wooden kayaks or Open Hardware and Hackerspaces. The last one will be held by me and I’ll try to bring a functional Rep Rap 3d printer from our Prague hackerspace brmlab so you can see it in action and print your own 3d models. All in the spirit of our motto: Have a lot of fun!

Together with Henne and Tom we’ll hold a workshop about our social networking platform called Connect and we hope we’ll get more contributors to it.

Among the talks I mentioned I also plan to visit sessions about GNOME 3, tmux, 5Ws of Contributions, Static Code Checking and Lightning Talks. And of course don’t miss the keynotes and social event The Geek in Wild West theme!

See you all there!

square-badge

openSUSE IRC Word Clouds

You might know a web tool call Wordle. It’s a simple way how to create nice word clouds from texts. It has one disadvantage though. It runs as a web service, so you cannot run it offline. I tried to find the source but the only thing I found was this FAQ answer, where Jonathan (the author) mentioned working for IBM. After few search queries I found Word-Cloud Generator, which seems like the Wordle predecessor from IBM that can be run offline. After some fiddling with the tool I present you these (word clouds from 3 big openSUSE IRC channels I am on, #opensuse-buildservice, #opensuse-factory, #opensuse-project):

opensuse-buildservice

opensuse-factory

opensuse-project

Come on, join our IRC channels and have a lot of fun!

Version sorting in Ruby

Today I needed to implement “human sort” for a list of distributions we support in the Open Build Service. I wanted to sort them alphabetically but at the same time the newest ones at the top. I ended up with the following code:

module Enumerable
  def version_sort
    sort_by { |key,val|
       key.gsub(/_SP/,'.').gsub(/_Factory/,'_100').split(/_/) \
          .map { |v| v =~ /\A\d+(\.\d+)?\z/ ? -(v.to_f) : v.downcase }
    }
  end
end

@distros = [
  'openSUSE_Factory_PPC',
  'CentOS_6',
  'openSUSE_11.4',
  'RHEL_4',
  'Mandriva_2010',
  'RHEL_5',
  'Debian_5.0',
  'SLE_10',
  'Ubuntu_9.04',
  'Fedora_14',
  'RHEL_6',
  'Ubuntu_11.04',
  'SLE_11',
  'Mandriva_2009.1',
  'CentOS_5',
  'openSUSE_11.3',
  'Debian_6.0',
  'openSUSE_11.1_Evergreen',
  'Ubuntu_10.04',
  'ScientificLinux_6',
  'openSUSE_Factory',
  'Ubuntu_10.10',
  'SLE_11_SP1',
  'Fedora_15',
  'Ubuntu_8.04',
  'Ubuntu_9.10',
  'Mandriva_2010.1',
]

@distros.version_sort.each{ |v|
  puts v
}

which produces this list:

CentOS_6
CentOS_5
Debian_6.0
Debian_5.0
Fedora_15
Fedora_14
Mandriva_2010.1
Mandriva_2010
Mandriva_2009.1
openSUSE_Factory
openSUSE_Factory_PPC
openSUSE_11.4
openSUSE_11.3
openSUSE_11.1_Evergreen
RHEL_6
RHEL_5
RHEL_4
ScientificLinux_6
SLE_11_SP1
SLE_11
SLE_10
Ubuntu_11.04
Ubuntu_10.10
Ubuntu_10.04
Ubuntu_9.10
Ubuntu_9.04
Ubuntu_8.04

Nifty, right? :-) The idea is simple. I use the sort_by function which pre-computes the values that are later compared. I replace some special values like “Factory” or “_SP”, because I want “Factory” to be the newest (100 is higher than any other openSUSE version) and “11_SP1” to behave exactly like “11.1”. Then I split the key using the “” delimiter and turn any string in form “digit” or “digit.digit” to float number. I change the sign, because I want versions to be sorted in the reverse direction. Good thing is that Ruby operator <=> works on arrays also, so I’m done with key modifications and the sort does the rest …

PS: I used |key,val| in sort_by block because I want to use this function also to sort hashes by their key. This way it works both for arrays and hashes with any further modifications.