• Dvorak and me

    Gergely Polonkai
    Mar 13, 2013 :: 21:20

    A few months ago I have decided to switch to the Dvorak layout. After using QWERTY (well, QWERTZ, to be precise) for almost 17 years, it was a hard decision, but now I think it worthed the try. I started with the UK (Dvorak with UK punctuation) layout, and in about four weeks, I’ve almost reached my original typing speed. Today I have modified the Hungarian xkb definitions file to add the Hungarian accended letters like ű to the layout, so I don’t have to use dead keys anymore (which apparently turned out to be a problem, as the Linux version of Java doesn’t support dead keys at all).

  • Haversine in MySQL

    Gergely Polonkai
    Mar 5, 2013 :: 12:49

    Just insert it in your database, feed them two Google coordinates, and you get the distance in kilometres. If you happen to need it in miles, change the constant 12756.200 in the RETURN row to 7922.6 instead.

  • Why I stopped using annotation based routing in Symfony today

    Gergely Polonkai
    Feb 27, 2013 :: 23:10

    I have read several opinions about routing configuration in Symfony. I stayed with annotation based routing as it was convinient for me to see the URL right above the controller action. This was because by just checking the URL, I remembered the controlling code, as they always were fresh ones. Well, until today.

  • git rm --cached madness

    Gergely Polonkai
    Jan 14, 2013 :: 21:38

    I have recently learned about git rm --cached. It’s a very good tool, as it removes a file from tracking, without removing your local copy of it. However, be warned that if you use git pull in another working copy, the file will be removed from there! If you accidentally put the configuration of a production project, and remove it on your dev machine, it can cause a lot of trouble ;)

  • Registering an enum type in GLib’s type system

    Gergely Polonkai
    Jan 6, 2013 :: 02:34

    I faced a problem in my GLib self-teaching project, wMUD today. I wanted to register a signal for a GObject, whose handler should accept two enum parameters for which I had to register a new GEnum type in the GObject type system. However, the documentation on this feature (thanks for pointing out goes to hashem on #gnome-hackers) is not… uhm… obvious. Making the long story short, I have checked with the GIO sources for an example, and using that, I have created this small, working chunk: