Flavio Castelli

Debugging my life

Aug 8, 2006 - 2 minute read - Comments - c++ qt

QShapes: a process modeling tool

A lot of time passed since my last post. As usually I’ve been too busy to keep the site updated, forgive me! Last time I let fall something about one of my university projects: qshapes. Now it’s time to tell you something more… QShapes is a process modeling tool, in short words a kind of 2D CAD. I’m going to release it under GPL over berlios site. Actually I I’ve registered the project (see http://developer.

May 12, 2006 - 1 minute read - Comments - howto

iBook X keyboard mapping

How to have a comfortable keyboard layout under X. A guide destinated to italian iBook linux users Target have the following keymap: apple keyboard = alt gr Instructions You’ve to edit your /etc/X11/xkb/keycodes/xfree86 file. Remember to make a backup copy of this file before editing. These’re the easy steps: under X run a program like xev to find the exact keycode of your apple key change the code with the new one comment all the old command referring the new keycode Restart X and keep your finger crossed ;)

May 12, 2006 - 1 minute read - Comments - howto

iBook console keyboard mapping

How to have a comfortable italian keyboard layout on your iBook. Target We just want this mapping: apple key = alt gr numpad return (the key near to left arrow) = canc Procedure Simply download the file at the end of the page and load it using loadkeys ibook-it.map.gz Simple, isn’t it? Download I found this file over internet, the author is Dario Besseghini. Thank you Dario! {% gist 2469779 %}

May 10, 2006 - 1 minute read - Comments - real life

No more exams!

Just a small announcement: last month (by 14th september) I’ve finished all my exams!! Obviously I’m really happy but I’m also really busy because I’m working hard on strigi. I’ll let you know something more about it in these days…

May 5, 2006 - 1 minute read - Comments - howto

iBook mouse emulation

In this really small guide you’ll discover howto enable mouse button emulation on a iBook G4 running linux Target: I just wanted to enable mouse button emulation on my iBook using the following shortcuts: fn + ctrl = middle mouse button fn + alt = left mouse button Requisites: You’ve to enable CONFIG_MAC_EMUMOUSEBTN in your kernel. Commands: In order to enable this shortcut at every boot add the following lines to your /etc/sysctl.

Apr 1, 2006 - 1 minute read - Comments - Italy Linux Day

Linux on console

These slides are about linux and modern console The article focuses on the installation of linux over some modern console like: Sega Dreamcast™ Sony Playstation 2 ™ Microsoft Xbox™ The presentation focuses mostly on the Xbox™ case. Linux consoleView more presentations from Flavio Castelli.

Feb 16, 2006 - 2 minute read - Comments - python

Svn commit helper

Svn-commit is a command line utility for making rapid commit with subversion. Suppose you’re working on your local copy of a subversion project. If you forget to run commands like svn del file or svn add file each time you add or remove a file, when you’ll try to commit your working copy you’ll obtain something like this: ? file: for each file/directory that isn’t under the revision system !

Feb 16, 2006 - 2 minute read - Comments - c++

Regexp with boost

How can you add regular expressions to C++? Here you’re three small examples. Pattern matching In this example you’ll find how you can match a regexp in a string. {% codeblock [pattern matching] [lang:c++ ] %} // Created by Flavio Castelli // distrubuted under GPL v2 license #include #include int main() { boost::regex pattern (“bg|olug”,boost::regex_constants::icase|boost::regex_constants::perl); std::string stringa (“Searching for BsLug”); if (boost::regex_search (stringa, pattern, boost::regex_constants::format_perl)) printf (“found\n”); else printf(“not found\n”);

Feb 15, 2006 - 1 minute read - Comments - bash

Svn cleaner

This simple program removes recursively all .svn directories. Requirements: In order to run remove-svn requires python. Synopsis: remove-svn syntax is: remove-svn dir in this way remove-svn will recursively remove all .svn directories found under dir. An example: remove-svnpwd`` UPDATE A faster way for removing .svn file through this simple bash command: find ./ -name *svn* | xargs rm -rf The old script has been removed.

Jan 1, 2006 - 1 minute read - Comments - c++ qt

QtCanvas

Finally qtcanvas classes are available for Qt 4 series This isn’t the final version of qtcanvas, it’s only a backport of the original classes shipped with Qt3. So what’s the difference between this qtcanvas and qt3canvas (available only through Qt3 support with Qt4)? Simple this version works with all open-source versions of Qt >= 4.1.0!! In this way you can use qtcanvas also under windows (before it wasn’t possible with the open-source edition).