venerdì 3 agosto 2012

git: adding all untracked, modified and deleted files

This is a memento for the future.

To git add all the untracked, modified or deleted files files in a repository:
$ git status -s|awk '{ print $2 }'|xargs git add
To git reset HEAD all the previously staged files:
$ git status -s|awk '{ print $2 }'|xargs git reset HEAD

venerdì 15 luglio 2011

Recording streams with VLC and cron

Here a quick and dirty shell script that can be crontabbed to download your favorite streams from the web via VLC


#!/bin/bash
# arguments "Name_of_file" "stream_uri" "duration_in_minutes"

FILE="/tmp/$1_$(date +%F_%H:%M).avi"
vlc -I dummy --sout file/avi:$FILE $2 &
PID=$!
echo "kill -STOP $PID" | at now + $3 minutes


The stream will be saved in /tmp/ with the name provided and a timestamp.

lunedì 16 maggio 2011

MonoCov fixed

I recently fixed the build problems of MonoCov on mono 2.10 (should work with 2.8 too).

The build errors were due to the dropped glib debendency from the mono runtime, which was still needed by monocov.

Now I can test the code coverage of Epic's unit tests even on my beloved Debian workstation. :-D

Should you encounter problems with the coverage of properties do not forget to run the unit tests with the -O=-inline
argument, like this:

$ mono -O=-inline --debug --profile=monocov:outfile=/tmp/Epic.cov,+[Epic.Core] nunit.exe -run Epic.nunit

Indeed mono inlines simple proprieties to get better performances, so that to get the coverage information you have to disable inlining.

domenica 13 marzo 2011

Follia cristiana

C'è una profonda follia nel cristianesimo, che i cristiani non vedono.

Tutto ciò che è forza per gli altri, è debolezza per i cristiani.
Tutto ciò che è forza per i cristiani, è debolezza per gli altri.

I cristiani non la vedono perché sono accecati dalla luce di Cristo.
E chi si professa cristiano, ma non è evidentemente folle, diverso, non segue Cristo.
Io non lo seguo, evidentemente.


La Fede irrompe come una luce abbagliante, miracolosa, che permette una visione profonda della vita. Una visione straordinariamente sorprendente.

Ma se non ti porta alla follia, ad essere completamente diverso dagli altri, a desiderare ciò che gli altri disprezzano, a fuggire ciò che gli altri desiderano, diventa un continuo interrogarsi (quando non diventa ideologia o retorica).


Da qualche tempo, mi interrogo su come dovrebbe essere la mia vita, su quale testimonianza devo offrire a Miriam.

Posso insegnarle una follia di cui io stesso ho paura?


D'altro canto il mondo fa schifo, ci spinge sostanzialmente a creare ricchezza per altri, ci spinge ad essere strumenti di cui ottimizzare il rendimento attraverso l'illusione di un tornaconto che non abbiamo.

giovedì 27 gennaio 2011

Corporate fishes

An enterprise system is a system that supports the day to day operations of an enterprise or organization in real time.
Strong, D.M. & Volkoff, O. (2004) 'A roadmap for enterprise system implementation', Computer, 37 (6), pp. 22-29.

This is the best definition of enterprise system that I've ever found.

Keeping this definition in mind is strategic for design and development decisions.

But it is even more important for corporate managers that choose technological patners.

Recent experiences with Microsoft lead me to think that no bank, school or medical institute should base their own software infrastructure on such a big company.

No matter how cheap could seem their solutions: the time will come when they put your interests after their own. And then you'll pay a lot more than you saved before.

Banks are big fishes, in the world's economy.

But even big fishes should avoid to depend upon bigger ones.

Enterprise software's README

Here is the last diff between two released Readme.txt files of an module of an enterprise application.


The file contains an italian exclamation "pirla!" that means "you are dumb!".

It's the only module that have a README file.

Fortunately, Windows' users just click. They can't read! :-D