Thursday, October 6. 2011
No to the gag law!
It's been days we are experiencing troubles and the effect haven't wait to show. This is both great and sad news that's why is important to show what's going on in Italy.
"It's outrageous! The infamous "legge bavaglio" is back on the table and Parliament could pass it any day now - only a massive public outcry can stop it.
Berlusconi's coalition is in tatters, but as he goes down he is using his majority to bulldoze through the "gag law", which would fatally curb the power of our legal system to fight crime and corruption, and impose draconian penalties for editors, journalists and bloggers who try to hold politicians accountable. Last year, we fought this law and won. Now it is up to us again -- let's fight back to save our democracy!"
A snip from an online petition I please you to sign and diffuse as much as you can because it's a matter of fundamental rights as the one of freedom of press.
Here the link:
http://www.avaaz.org/en/no_bavaglio_2/?cTNecb
Wikipedia (Italian) stopped to provide the service for the same reason. Here you can read more.
"It's outrageous! The infamous "legge bavaglio" is back on the table and Parliament could pass it any day now - only a massive public outcry can stop it.
Berlusconi's coalition is in tatters, but as he goes down he is using his majority to bulldoze through the "gag law", which would fatally curb the power of our legal system to fight crime and corruption, and impose draconian penalties for editors, journalists and bloggers who try to hold politicians accountable. Last year, we fought this law and won. Now it is up to us again -- let's fight back to save our democracy!"
A snip from an online petition I please you to sign and diffuse as much as you can because it's a matter of fundamental rights as the one of freedom of press.
Here the link:
http://www.avaaz.org/en/no_bavaglio_2/?cTNecb
Wikipedia (Italian) stopped to provide the service for the same reason. Here you can read more.
Tuesday, July 6. 2010
Git: basic commands
With people who have always used cvs or svn, git may looks confusing at first place. It's just a first-day impression!
Let's go.
Cloning a repository
While using cvs or svn we aren't aware of this word..cloning, right because in such environments this word doesn't make sense. Doing a checkout is different from doing a clonation.
As we saw in the git overview pictures, the structure of the repository is exactly the same
on the server and the clients. That's why we talk about cloning. While doing a clonation you get exactly the server's structure and than you can work on local without any needs
to ping the server apart from mirroring the changes. This is not possible with cvs or svn, because a command as commit, requires a server's connection.
I'm using here as example, the claws mail git repository of Holger (thanks for silently agree
). Be aware this is not the official claws mail repository, since officially it only uses cvs.
This is basically what you would do with cvs on the official repository with:
Adding files
Let's say you want to add files to the repository, and keep track of them with git, you'd need to:
Committing
Once you added files or modified them, you'd want to commit changes on the local database with some of these:
The -a option is for committing all changes.
If the -m option for the comment is omitted, this means the default editor will be opened to add a new comment.
Another useful option for commit is the --amend one.
If you do something wrong with your commit, like missing a file or a typo in the comment, using this option allows you to redo the operation and the commit will refer to the same already committed.
Instead if you want to reset changes you did with a file, you need to use the checkout command (which is commonly used with branches):
Status
This is another interesting command which let you see what's going on and gives you hints about what to do:
Diff
Log
That's to see cronology of commits, there's also a graphic tool not given by default called gitk which requires tk libraries.
Reset
If there's a wrong add of a file it can be removed with:
As you can see here, HEAD, it's just a pointer to the current selected branch. I'll talk another time about git branches.
Fetch
It updates the local database with something else.
Git calls the remote repository, origin so with:
looks like cvs up or svn up. The origin can be omitted since it's implicit, but i added to to show you can have options.
Pull
this works as a couple of commands, the fetch and the merge one(i'll talk about this together with branches).
Push
That's similar to cvs commit or svn commit.
Here i'm pushing differences on the remote database (origin) from the local database(master).
Master is so called as the default branch created in git.
Tag
list tags:
Creating one:
All these commands can be used with a double syntax as git command or git-command
Let's go.
Cloning a repository
While using cvs or svn we aren't aware of this word..cloning, right because in such environments this word doesn't make sense. Doing a checkout is different from doing a clonation.
As we saw in the git overview pictures, the structure of the repository is exactly the same
on the server and the clients. That's why we talk about cloning. While doing a clonation you get exactly the server's structure and than you can work on local without any needs
to ping the server apart from mirroring the changes. This is not possible with cvs or svn, because a command as commit, requires a server's connection.
I'm using here as example, the claws mail git repository of Holger (thanks for silently agree
git clone http://github.com/hb/claws-mailThis is basically what you would do with cvs on the official repository with:
export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@claws-mail.org:/ co -r gtk2 claws Adding files
Let's say you want to add files to the repository, and keep track of them with git, you'd need to:
$ git add configure.ac
$ git add *.c
$ git add README ChangelogCommitting
Once you added files or modified them, you'd want to commit changes on the local database with some of these:
$ git commit main.c
$ git commit -a
$ git commit -m "file README added" READMEThe -a option is for committing all changes.
If the -m option for the comment is omitted, this means the default editor will be opened to add a new comment.
Another useful option for commit is the --amend one.
If you do something wrong with your commit, like missing a file or a typo in the comment, using this option allows you to redo the operation and the commit will refer to the same already committed.
Instead if you want to reset changes you did with a file, you need to use the checkout command (which is commonly used with branches):
$ git checkout -- file_i_messed_upStatus
This is another interesting command which let you see what's going on and gives you hints about what to do:
$ git statusDiff
$ git diff
$ git diff-files
$ git diff-tree
$ git diff-indexLog
$ git logThat's to see cronology of commits, there's also a graphic tool not given by default called gitk which requires tk libraries.
Reset
If there's a wrong add of a file it can be removed with:
$git reset HEAD file_to_removeAs you can see here, HEAD, it's just a pointer to the current selected branch. I'll talk another time about git branches.
Fetch
It updates the local database with something else.
Git calls the remote repository, origin so with:
$ git fetch originlooks like cvs up or svn up. The origin can be omitted since it's implicit, but i added to to show you can have options.
Pull
$ git pullthis works as a couple of commands, the fetch and the merge one(i'll talk about this together with branches).
Push
That's similar to cvs commit or svn commit.
$ git push origin masterHere i'm pushing differences on the remote database (origin) from the local database(master).
Master is so called as the default branch created in git.
Tag
list tags:
$ git tagCreating one:
$ git tag my_new_tagv2.1.1All these commands can be used with a double syntax as git command or git-command
Monday, July 5. 2010
Git: Basic setup
Git comes with a tool called git config that lets you get and set configuration variables that control all aspects of how Git looks and operates.
Apart from this tool, it's still possible for most fo the configuration variables to set git environment variables in places as /etc/profile, ~/.bashrc ecc..
These variables can be stored in three different places:
Your identity
In the same way with using environment variables:
Your editor
By default git uses the one used by default in the system, to change it:
In the same way with using environment variable:
Your diff tool
Git accepts kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff as valid merge tools
Checking your settings
Getting help
Using a proxy
Instead of establish a direct connection to the remote server is possible to set a proxy. Check the gitproxy-socat which wraps socat to allow git through a proxy:
In the same way with using environment variable:
Shared repository
When group (or true), the repository is made shareable between several users in a group (making sure all the files and objects are group-writable).
When all (or world or everybody), the repository will be readable by all users, additionally to being group-shareable. When umask (or false), git will use permissions reported by umask.
When 0xxx, where 0xxx is an octal number, files in the repository will have this mode value. 0xxx will override user´s umask value, and thus, users with a safe umask (0077) can use this option.
Examples: 0660 is equivalent to group. 0640 is a repository that is group-readable but not group-writable.
Excluding files
In addiction to .gitignore (within the directory) and .git/info/exclude it's also possible to use
Coloring diff
Apart from this tool, it's still possible for most fo the configuration variables to set git environment variables in places as /etc/profile, ~/.bashrc ecc..
These variables can be stored in three different places:
- /etc/gitconfig file: Contains values for every user on the system and all their repositories. If you pass the option --system to git config, it reads and writes from this file specifically.
- ~/.gitconfig file: Specific to your user. You can make Git read and write to this file specifically by passing the --global option.
- config file in the directory (that is, .git/config) of whatever repository you’re currently using: Specific to that single repository. You may use --file option to refer to this.
Your identity
$ git config --global user.name "Bob Dobbs"
$ git config --global user.email bdobbs@subgenius.org
In the same way with using environment variables:
$ cat << EOF >> ~/.bashrc
> export GIT_AUTHOR_NAME='Bob Dobbs'
> export GIT_COMMITTER_NAME=Bobby
> export GIT_AUTHOR_EMAIL=bdobbs@subgenius.org
> export GIT_COMMITTER_EMAIL=bdobbs@subgenius.org
EOF
Your editor
By default git uses the one used by default in the system, to change it:
$ git config --global core.editor vimIn the same way with using environment variable:
$ echo "export GIT_EDITOR=vim" >> ~/.bashrcYour diff tool
Git accepts kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff as valid merge tools
$ git config --global merge.tool vimdiffChecking your settings
$ git config --list or a specific field with $ git config user.nameGetting help
$ git help <verb>
$ git --help <verb>
$ man git-<verb>Using a proxy
Instead of establish a direct connection to the remote server is possible to set a proxy. Check the gitproxy-socat which wraps socat to allow git through a proxy:
$ git config --global core.gitProxy gitproxy-socat In the same way with using environment variable:
$ echo "export GIT_PROXY_COMMAND=gitproxy-socat" >> ~/.bashrcShared repository
$ git config --global core.sharedRepository devel When group (or true), the repository is made shareable between several users in a group (making sure all the files and objects are group-writable).
When all (or world or everybody), the repository will be readable by all users, additionally to being group-shareable. When umask (or false), git will use permissions reported by umask.
When 0xxx, where 0xxx is an octal number, files in the repository will have this mode value. 0xxx will override user´s umask value, and thus, users with a safe umask (0077) can use this option.
Examples: 0660 is equivalent to group. 0640 is a repository that is group-readable but not group-writable.
Excluding files
In addiction to .gitignore (within the directory) and .git/info/exclude it's also possible to use
$ git config --global core.excludefile pattern_fileColoring diff
$ git config --global color.diff true Sunday, July 4. 2010
Git: A Git overview
Git is DVCS (distributed version control system) which acts similarly as Mercurial, Bazaar or Darcs.
CVS or Subversion are CVCS (centralized version control system) and the major difference between them is clear in these pictures:
CVCS structure:

With CVCS everything is stored on the server and if that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on.
If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything the entire history of the project except whatever single snapshots people happen to have on their local machines.
DCVS structure:

In DCVS clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every checkout is really a full backup of all the data.
So Git thinks about its data in a different way than any other VCS (Subversion and friends included). Conceptually, most other systems store information as a list of file-based changes while Git thinks of its data more like a set of snapshots of a mini filesystem. Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. This also means most operations in Git only need local files and resources to operate without any network latency overhead that's why most operations seem almost instantaneous.
With CVS or Subversion you can edit files locally, but you can't commit changes to your database (because it's just on the server).
Git has special states for the files which are:
CVS or Subversion are CVCS (centralized version control system) and the major difference between them is clear in these pictures:
CVCS structure:

With CVCS everything is stored on the server and if that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on.
If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything the entire history of the project except whatever single snapshots people happen to have on their local machines.
DCVS structure:

In DCVS clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every checkout is really a full backup of all the data.
So Git thinks about its data in a different way than any other VCS (Subversion and friends included). Conceptually, most other systems store information as a list of file-based changes while Git thinks of its data more like a set of snapshots of a mini filesystem. Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. This also means most operations in Git only need local files and resources to operate without any network latency overhead that's why most operations seem almost instantaneous.
With CVS or Subversion you can edit files locally, but you can't commit changes to your database (because it's just on the server).
Git has special states for the files which are:
- committed, means that the data is safely stored in your local database
- modified, means that you have changed the file but have not committed it to your database yet
- staged, means that you have marked a modified file in its current version to go into your next commit snapshot
Wednesday, May 26. 2010
Mac: debian package for amd64
Hey,
sometimes it happens to get from friends some music in the ape format and have the wish to convert it in mp3 or ogg format.
I surfed a bit to check if some converter is available, and i found this script, cueape.sh
which does the job pretty well with also cutting and naming the tracks.
Using it is fairly easy:
$ cueape.sh myfile.ape myfile.cue -m
this will convert an ape file to several mp3 files. If you prefer the ogg format, just use the option -o instead of -m
This script to work requires some packages, most of them are listed in here
There's only one issue, the mac utility is not available on the repositories and on this link there's just the version for i386 architecture.
Since i'm using amd64 i had to build (with assembly support) myself the debian package: you can download it here
sometimes it happens to get from friends some music in the ape format and have the wish to convert it in mp3 or ogg format.
I surfed a bit to check if some converter is available, and i found this script, cueape.sh
which does the job pretty well with also cutting and naming the tracks.
Using it is fairly easy:
$ cueape.sh myfile.ape myfile.cue -m
this will convert an ape file to several mp3 files. If you prefer the ogg format, just use the option -o instead of -m
This script to work requires some packages, most of them are listed in here
There's only one issue, the mac utility is not available on the repositories and on this link there's just the version for i386 architecture.
Since i'm using amd64 i had to build (with assembly support) myself the debian package: you can download it here
Tuesday, July 21. 2009
Fancy: The Webkit Plugin for Claws Mail
The Webkit Plugin, named as Fancy Plugin is available in claws-mail cvs extra plugins!
Get it from here:
export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@claws-mail.org:/ co -r gtk2 plugins
Since there are some issue with snapshot on claws-mail.org here is available a mirror
For the same issue packages for ubuntu are not available. Anyway, unofficially, you can get them from
this link.
Snapshots are now available on Claws Mail
Anyway for any problems you can write to me or join the #claws channel on freenode.
Have fun.
Get it from here:
export CVS_RSH=ssh
cvs -z3 -d:pserver:anonymous@claws-mail.org:/ co -r gtk2 plugins
For the same issue packages for ubuntu are not available. Anyway, unofficially, you can get them from
this link.
Snapshots are now available on Claws Mail
Anyway for any problems you can write to me or join the #claws channel on freenode.
Have fun.
« previous page
(Page 1 of 1, totaling 6 entries)
next page »

