Flavio Castelli

Debugging my life

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).

Dec 8, 2005 - 2 minute read - Comments - perl

Gentoo documentation checker

gen-docheck is a useful tool for the gentoo italian translation team. gen-dockeck compares the version number of english document and italian translation. In this way you can watch the status of one or more guides, keeping the translations updated. Features: mail notification support (straight to guide’s translator or to a specified address) filter guides using regular expressions Requirements: gen-dockeck requires: perl perl module LWP::Simple (under debian is provided by libwww-perl) perl module Net::SMTP perl module Getopt::Long (usually available by default with all perl installation) perl module Pod::Usage (usually available by default with all perl installation) Synopsis: gen-docheck syntax: gen-docheck [--help] [--man] [--config configuration file] for more informations read the man page: gen-docheck --manan

Dec 8, 2005 - 1 minute read - Comments - bash

Howto edit multime id3 tags from command line

Goal id3medit is a simple script for tagging all mp3/ogg files present in a directory. Requirements: id3medit relies on id3v2, a command-line tool for editing id3v2 tags file names must be in format: ’## - trackname.ext’. Where ## is track’s number, and ext is file’s extension (mp3 or ogg in case insensitive format) Synopsis: id3medit syntax is: id3medit artist album year(*) genre(*) Where * denotes optional arguments You can obtain genre identification number in this way: id3v2 -L | grep -i genre

Aug 12, 2005 - 1 minute read - Comments - Italy

Linux and cryptography

A speech about cryptography and linux. This speech is about: crypted email with gnupg crypted file system avaible under linux, an overview and a comparison of loop-AES , cryptoloop, dm-crypt, bestcrypt creation of a full crypted file-system, root included. The most interesting feature is system’s boot sequence, which uses a usb token for authenticating users Seminario crittografia-linux-day-2004View more presentations from Flavio Castelli.