Thursday, October 25, 2012

Branching with GIT

Yann Esposito compares BZR and GIT Distributed Version Control Systems (Source control).

I like this example of branching and merging for GIT though.

Cheap branching

You always work into the same main directory. For example, you can work on two fix in the same time. Say fix1 require you to work on file1 and fix2to work on file2. You can work in any order on file1 and file2 in themaster branch. And then go to branch fix1, commit file1 into it. Then go to branch fix2 and commit file2 into it. And finally merge the two branchesfix1 and fix2 into master.
> vim file1
> vim file2
> git br fix1
> git add file1 
> git commit -m 'fix1'
> git br fix2
> git add file2
> git commit -m 'fix2'
> git commit master
> git merge fix1
> git merge fix2
And this is great not to worry about working in the good branch and coding in the same time. You just worry about your code and then about the versionning system.
And I use this possibilities a lot. Working with bazaar, I often made the error to begin a change in the bad branch. then I have to copy my modifications, then revert. In short it was tiedous.
This is why I prefer using git on an every day usage. If Bazaar implement the same way of cheap branching than git. I should switch again.

File associations

There is a lot of information at libre-software.net

Associate all office documents to LibreOffice instead of OpenOffice.org

Display all the MIME types associated to OpenOffice.org documents with the following command:

cat /usr/share/applications/defaults.list | grep openoffice.org
Append all the concerned lines to the local file:
cat /usr/share/applications/defaults.list | grep openoffice.org >> ~/.local/share/applications/mimeapps.list
Open the defaults.list description file with gedit:
gedit ~/.local/share/applications/mimeapps.list
And replace all occurences of "openoffice.org" with "libreoffice" 
 
Finally, save the file. No need to restart, you're all set!

Friday, October 19, 2012

Disable overlay scrollbars in Ubuntu

Some nice tricks from noobslab for Ubuntu 12.10

Disable overlay scroll bars in Ubuntu

gsettings set com.canonical.desktop.interface scrollbar-mode normal

Disable crash reports

I have had a lot of issues with crash reports that just keep on occurring, even when I say "don't tell me again" and when nothing has apparently happened.
sudo gedit /etc/default/apport  
change "enabled=1" to "enabled=0"
sudo service apport stop

Add "open as administrator" as a right click option in nautilus

wget http://dl.dropbox.com/u/53319850/NoobsLab.com/libnautilus-gksu.so 
sudo cp libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/ 
sudo rm libnautilus-gksu.so