Posts filed under 'Software'
If you, like me, log all of your IM conversations; if you, like me, use Pidgin or another client based on libpurple; if you, like me, have friends that often change their status line, generating useless log lines as
foo changed status from Busy to Busy @ whatever
If you think, as well as me, that 150 MB of logs are way too much; well this is the script for you.
Purple Logs Cleaner aims at removing redundant entries from system logs in textual format. It looks for the .system folders of all your Pidgin/Finch accounts and automatically removes lines according to some customizable patterns. By now, it removes lines in the form “… changed status from … to …”, where the starting and the final status are the same (both in the English and in the Italian translated version “… ha cambiato stato da … a …”); you can hack the sed line at will, but please send me patches
. The script will not touch any other file and it won’t run (obviously) if Pidgin is active.
Back to the numbers: after sixteen minutes of cleaning (kinda slow, because I had to scan for both English and Italian patterns, as I had some problems with intltool in the past), my ~/.purple/logs directory size decreased from 159 MB to only 58 MB! But, more importantly, the .system subdirectories, whose content is the only one touched by the script, decreased from an aggregated size of 143 MB to approximately 40 MB, that is the removal of the 72% of the original content! Subsequent invocations are much faster, under ten minutes, because much of the cruft has already been removed.
Ok, this is enough
You can download the script HERE !
Comments are welcome
September 4th, 2009
The first official 23.* version of the popular text editor Emacs has been released. Well, “text editor” is almost a reduction of functionality, as Emacs has thousands of commands to accomplish the most unthinkable tasks.
From the official announcement:
Here are some new features of Emacs 23.
– Improved Unicode support (the internal character representation is now based on UTF-8).
– Font rendering with Fontconfig and Xft.
– Support for using X displays and text terminals in one session, and for running as a daemon.
– Shift-selection.
– Smarter minibuffer completion.
– Per-buffer text scaling.
– Directory-local variables.
– New packages for:
* viewing PDF and postscript files (Doc view mode)
* connecting to processes via D-Bus (dbus)
* using the GNU Privacy Guard (EasyPG)
* displaying line numbers in the fringe (Linum mode)
* editing XML documents with on-the-fly validation (nXML mode)
* editing Ruby programs (Ruby mode)
* display-based word wrapping (Visual Line mode)
July 31st, 2009
Some days ago, the Free Software Foundation published a short, very interesting article by Richard Stallman that claims, as summarized in the title, that the FOSS community should not pursue the patent-encumbered way of the compatibility with closed minds.
This is not to say that implementing C# is a bad thing. Free C# implementations permit users to run their C# programs on free platforms, which is good. [...] The problem is not in the C# implementations, but rather in Tomboy and other applications written in C#. If we lose the use of C#, we will lose them too. That doesn’t make them unethical, but it means that writing them and using them is taking a gratuitous risk.
Full article here: http://www.fsf.org/news/dont-depend-on-mono
June 29th, 2009
It’s a few weeks now that I’m keeping my personal Gentoo overlay on github. I’m uploading there some ebuilds that I need, usually to fix bugs corrected only on Bugzilla, to bump recent packages or anything that is not yet in the official Portage tree or in any of the popular overlays that I use.
http://github.com/dark/darkGentooOverlay/tree/
If you wish to use it, just clone it somewhere in your disk with
git clone git://github.com/dark/darkGentooOverlay.git
and add the fetched folder to your
PORTDIR_OVERLAY.
If you have any comments, please let me know
June 20th, 2009
There is a recurring problem that (used to) annoy me when I tried to use my webcam with Skype on Linux. Being a proud owner of a
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)
the number of Xv ports that the display driver (xf86-video-intel) exports to the applications is quite limited:
$ xvinfo | grep ports
number of ports: 1
Yep, only one, not enough to show both the incoming and the outgoing video stream. Skype underlines the problem by printing
Xv ports available: 1
on the console and, most importantly, by crashing whenever I try a full-duplex video conversation.
The workaround I found this evening is quite simple and I wonder why my previous attempts were unable to hit the target:
- Establish the audio conversation with the counterpart.
- Enable my own video stream: I see the video thumbnail and the peer starts receiving my image.
- Disable the local visualization of my video stream: I no longer see the preview, but the counterpart still receives my video. More importantly, the video resource (the Xv port) is still held by the application, so the attempt to show a new video window, in this moment, would crash Skype.
- Stop streaming my own video: the peer no longer sees my image. Probably Skype releases the Xv port in this moment.
- Ask the peer to start streaming his/her image: Skype allocates the (now free) Xv port to the incoming video, thus showing the counterpart data.
- Restart my video stream: Skype remembers that I desired not to see my preview in the current session, so no allocation attempt takes place, thus no crash.
Maybe there are some variations of the algorithm that work as well, but that’s enough for me
(and this method is almost transparent to the counterpart).
April 17th, 2009
The fourth major version of the popular Unix shell, bash, has been released.
This release fixes all the outstanding bugs and introduces some new functionalities: associative arrays, improvements to the programmable completion functionality, case-modifying word expansions, co-processes, support for the ‘**’ special glob pattern (that matches all directories and files within them, when appropriate, recursively) and additions to the shell syntax and redirections (like ‘|&’ as a synonym for ’2>&1 |’, that I use frequently).
You can read the official announcement here.
Source: http://lwn.net/Articles/320353/
February 24th, 2009
In a few days, the UNIX time will reach quota 1234567890.
You can try and see the exact second in which this event will happen on your machine by running in a shell:
perl -e 'print scalar localtime(1234567890),"\n";'
For all of those (like me) who live in GMT+1 (CET) the output should be:
$ perl -e ‘print scalar localtime(1234567890),”\n”;’
Sat Feb 14 00:31:30 2009
I assure you that I will be eagerly waiting for that moment.
(whatever the reason)
Thanks Slashdot for reminding me.
February 9th, 2009
Gli studenti del Politecnico di Torino già conoscono le mitiche macchinette blu (i “totem”) che permettono di stampare statini, certificati ed eseguire semplici operazioni di segreteria. I medesimi studenti sanno anche che detti computer sono sandboxed, cioè le azioni che l’utente può compiere sono limitate a quelle che i sistemisti considerano accettabili: browser personalizzato con accesso alla sola rete interna, applet Java dedicati per l’uso dei servizi di segreteria, eccetera…
Uhm… ne siete davvero sicuri? 
No.

Mentre ero lì che stampavo statini per gli esami di questo periodo è comparso un piccolo pop-up che mi chiedeva s’io volessi aggiornare
Adobe Acrobat Reader all’ultima versione disponibile. Avrei potuto lasciarmi scappare un’occasione del genere? Ancora una volta,
no 
Sono andato avanti nell’esplorazione, assieme agli amici della compagnia della nerdizia
(di Strategia ed Innovazione).
Rispondendo affermativamente alla richiesta si è aperta una pagina del sito della Adobe. Innanzitutto abbiamo scaricato l’aggiornamento suggerito, che ci ha dato accesso alla finestra dei downloads di Firefox
(ancora sandoboxato). La finestrella riporta un collegamento al
Desktop; cliccandoci abbiamo fatto comparire la barra delle applicazioni di Windows, che però non rispondeva ai comandi.
Non ci siamo arresi.
La ricerca nel sito della Adobe era gestita da
Google, quindi in basso alla pagina c’era un altro link al sito del motore di ricerca; il target del link era molto probabilmente
_blank, quindi si è aperta una nuova finestra di Firefox, con tutti i menu e le barre al loro posto.

Una volta avuto accesso a quello è stato facile. Innanzitutto abbiamo provato siti di vario genere, come
Youtube (segue foto con in bella vista un video sui LOLCATS).

Seguendo i suggerimenti di
mamma Google, abbiamo scaricato ed installato con successo
Google Chrome (vedere sotto per un’immagine), dimostrando che l’utente costantemente loggato gira con i privilegi di amministratore. Ed a quel punto la barra delle applicazioni ha iniziato a rispondere ai click. Abbiamo aperto il menu
Start ed un prompt dei comandi
(per gradire), come dimostrato nella prima foto del repertorio.
Lezione del giorno: un altro punto a sfavore del sistema informatico del Poli (questa volta la parte hardware, ma si somma alla precedente figuraccia); un punto, invece, guadagnato dagli infaticabili smanettoni di Ingegneria Informatica
AGGIORNAMENTO: all’uscita dal laboratorio, alla fine dello studio, siamo ripassati davanti al totem. La pagina web non era quella che avevamo lasciato, ma il sistema era ancora in uno stato di palese vulnerabilità. Amanti come siamo della ricorsione, abbiamo scattato un’ulteriore foto, questa volta in Chrome, visitando un sito… molto particolare 
January 27th, 2009
A new version of udp2tcp has been released today. Changes include:
- Usage of GCC function attributes
- Refactoring of the folders scheme to a better one
- Refactoring of the filters code and migration to a different scheme
- Addition and improvement of the command-line parsing function
- Makefile enables debug info in the object files
Link to the project: http://sourceforge.net/projects/udp2tcp/
Download here: http://downloads.sourceforge.net/udp2tcp/udp2tcp-0.0.2.tar.gz
June 15th, 2008
Some days ago the DNS server of my dormitory stopped working, so I (we, me and all my colleagues) lost most of the network functionality. As the DNS port is blocked by the dormitory firewall, I could not rely on external servers to resolve names, so… ? Fortunately, I had already established an SSH tunnel towards the outside world, so I wondered if I could use it to solve my problem. If only I could re-route the local DNS requests over the TCP tunnel…
Well, I was not able to force my system to resolve names over TCP, so I needed a “UDP to TCP, and back” translation mechanism. Briefly, udp2tcp was born!
I registered the project udp2tcp on Sourceforge (link to the project) and its first version (0.0.1) can be downloaded here:
http://downloads.sourceforge.net/udp2tcp/udp2tcp-0.0.1.tar.gz
This project is still at an early stage, but any suggestion is welcome!
June 12th, 2008
Previous Posts