May 5, 2014

0 notes

Remove files from git repo through .gitignore

If you add a folder to .gitignore you can then update your repo status removing the newly ignored files w/ one command:

git rm --cached `git ls-files -i -X .gitignore` It’ll remove cached files from the ignored ones, reading from .gitignore. Note that files will be removed just from the repo, not from your filesystem.

From git help ls-files

-i, --ignored
       Show only ignored files in the output. When showing files in the index, print only those matched by an exclude pattern. When showing "other" files, show only those matched by an exclude pattern.
-X <file>, --exclude-from=<file>
       Read exclude patterns from <file>; 1 per line.

Thanks to

May 5, 2014

0 notes
angeloradici asked: ciao posso avere un tuo cv professionale? Grazie

Ciao angeloradici,

mi dispiace, ma non รจ mia consuetudine lasciare il mio curriculum e non ne avrei nemmeno uno pronto non essendo in cerca di impiego.

Se ti interessa sapere qualcosa di specifico su di me o sulle mie competenze puoi senz’altro chiedermelo qui.

Scusa per il tempo impiegato a risponderti.

Buona giornata :)

Mar 26, 2014

0 notes
Oct 20, 2013

0 notes

MySql ruby-gem without MySQL


$ gem install mysql2

w/o having MySQL installed locally? You’ll miss mysql.h. Resolve with

$ sudo apt-get install libmysqlclient-dev
Sep 26, 2013

1 note

Test strings against regex in bash

Hey, talking about nowdays bash (GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu)), let’s look at this:

$ str='0000.cacca'
$ [[ "$str" =~ ^[[:digit:]]{4}\.cacca$ ]] && echo "yes" || echo "no"
$ yes

Yum yum

« To the past Page 1 of 6
Want to ask something? Let's try
Subscribe via RSS.