giovedì 15 giugno 2017

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.

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