Author: mattions

Git set up a public repository

If you have to set up a public repository with git you can follow the instruction found on the git-core tutorial
(Hint: Search for “Publishing your work”)

Things to keep in mind:

  • Public repository are usually named as project.git and it’s a directory even if you can be mislead to think it’s a file for the extension (.git). Well, it’s not a file.
  • you need to login in the remote host (the one from which you will share your repo) and initialized a local git database:
    • ssh account compulsory
    • git should be in the path and available in the web server
  • You need an ssh account over there.
  • Then you can push your changes to the new shiny repo.

The steps to do that:

  1. login the remote <public-host>
  2. mkdir project.git
  3. GIT_DIR=my-git.git git init
  4. mv project.git/hooks/post-update.sample project.git/hooks/post-update This make sure that after every push the git update-server-info is ran and your repo can be accessed in the public way.
  5. git push <public-host>:/path/to/project.git master

Git Again – Svn Workflow

On this page on the GNOME website I found how to use git properly if you are using it as a gateway to a svn:

  1. git svn clone _svn_server_location #Clone the repository
  2. git svn fetch #Download the stuff
  3. git svn rebase #Merge the updates with the current
  4. git checkout -b myfeature #Create a local branch
  5. hack hack hack # hack
  6. git commit -am "changed stuff" # Commit
  7. hack hack hack # hack
  8. git commit -am "changed other stuff" # Commit
  9. git checkout master # Change to master branch
  10. git merge --squash myfeauture #Merge myfeature to master
  11. git commit -am "merge the feature to the master"
  12. git svn dcommit # Commit everything on the svn server

More info about git in the previous posts

Some stuff about git you should know

Git rocks, and after two days of using I can confirm it.

I was a user of bazar, but with the switching of GNOME to git and the big trouble that bazar was giving me to commit on the svn of the EBI I decided to give to git a go.

Also on bioinfoblog the match between git and bazar it’s a though one, but I right now the svn support from git just works out of the box, so I started to use it.

I want also to point out that with the last git (ATMOW) is possible to create a remote branch on the svn server with:

git svn branch mybranch

and this was one of the killer feature that made me switch.

This is not a tutorial on git but I will provide you some quick and dirty pointers to other posts that I found interesting for a quick introduction to git.

Stuff to keep in mind about git:

  • You always work in a local branch.
  • You commit locally
  • You push (or dcommit if using a remote svn repository) to the remote branch.
  • The name of a remote branch is remote/foobar and you need to put the remote prefix also if it doesn’t show up with the remote prefix not optional. You need this if you create a local branch and you want to track a remote branch.

Some pointers here:

I’ve customized my bash prompt to show my current branch on a git repository. This is the code (based on some code found on the net that I can’t track anymore.. I’m sorry….) looks like this:

#git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/'
}
#grey
PS1='[33[0;32m]u[33[1;32m]@[33[0;32m]h[33[00m]:[33[01;34m]W[33[1;30m]$(parse_git_branch)[33[00m]$ '

The terminal looks like this
git prompt

Sulla legge riguardo al testamento biologico

Credo che qui possiate trovare un pensiero molto condivisibile.

È orribilmente pauroso pensare che qualcun altro che sia un perfetto sconosciuto abbia il diritto di decidere che cosa mi deve succedere.

È incredibile che questa maggioranza e questo governo sia stato capace di fare una scelta del genere. Se metti degli uomini piccoli al comando ti ritrovi con dei grandi errori.

Fibra per l’Europa?

Leggo quest’ottimo progetto che pone in primo piano lo sviluppo di una rete a banda larga, basata sulla fibra come proposta e come impegno che un parlamentare europeo possa assumersi.

Fibra che ride

L’argomento non è nuovo ed è parecchio che è già stato segnalato e posto sotto i riflettori anche da Quintarelli tempo fa lanciando la campagna la fibra che ride.

Di che cosa stiamo parlando:
internert ed affini (email, VoIP, etc..) viaggiano su dei cavi. Il tipo di cavo e la tecnologia che implementa può rendere il collegamento molto lento e povero di banda (ovvero il numero di dati che riesci a far passare) oppure può rendere il collegamento estremamente veloce ed ampio.

La differenza è notevole e diventa estremamente chiara. Confronto veloce: Vecchio modem 56K, ADSL odierna.

A questo punto, se vi ricordate come era navigare ai tempi del 56K, capite di che salto di qualità stiamo parlando. Se non ve lo ricordate, allora pensate che ancora dovevate aprire una enciclopedia di carta per fare le ricerche, invece che andare su wikipedia od usare google.

GMail offline available

It was a long time that I was wondering when the offline service will be available….

Gears is out for a while, so the technology was there….

gmail offline
Today I discovered gmail offline becomes available from the lab.

Well, it’s the same idea of the readers offline… It’s really good stuff. Give it a go. You need gears and lab installed 😛

Ubuntu: Black screen at the login

Today I’ve got a black (sad) screen after restarting the computer. The boot process was fine but everything seems to hang when the nvidia drivers was supposed to kick in and Xorg start.

It was impossible to fall back to any console text login type.

I’ve searched the internet here and there, but I was not able to find any solution or bug report, so I come up with an workaround.

I think the problem is due to the new kernel that I’ve installed following one of the suggested update and the incompatibility with the nvidia drivers. I don’t know if it is the true problem, but I have an hint that this can be true.

As the matter of fact I’ve changed the kernel at the boot time  (Push Esc when GRUB is showing the timeout for the default choice) and I choose the previous version (i.e. Ubuntu 8.10, kernel 2.6.27-12-generic).

With this one I was able to login and my system seems to be completely functional, up and running again.

For the time being I decided to stick with this kernel.  I edited the grub menu list (/boot/grub/menu.lst) changing the default 0 (Ubuntu 8.10, kernel 2.6.27-13-generic) with the second option (Ubuntu 8.10, kernel 2.6.27-12-generic).

Here my current menu.lst


# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 2

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

...
TRIM
...

## ## End Default Options ##

title Ubuntu 8.10, kernel 2.6.27-13-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-13-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-13-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-13-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-13-generic

title Ubuntu 8.10, kernel 2.6.27-12-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro quiet splash
initrd /boot/initrd.img-2.6.27-12-generic
quiet

title Ubuntu 8.10, kernel 2.6.27-12-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=6e98c429-d480-44bd-a689-83114a227939 ro single
initrd /boot/initrd.img-2.6.27-12-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

Note that default 0 takes always the latest.
HIH.

Update: Found the BUG https://bugs.launchpad.net/ubuntu/+source/linux/+bug/337019/

Leonardo e l’arte del posporre

Uomo vitruviano

Uomo vitruviano

Un bel pezzo su Leonardo lo trovate sul chronicle :

If creative procrastination, selectively applied, prevented Leonardo from finishing a few commissions — of minor importance when one is struggling with the inner workings of the cosmos — then only someone who is a complete captive of the modern cult of productive mediocrity that pervades the workplace, particularly in academe, could fault him for it.

Productive mediocrity requires discipline of an ordinary kind. It is safe and threatens no one. Nothing will be changed by mediocrity; mediocrity is completely predictable. It doesn’t make the powerful and self-satisfied feel insecure. It doesn’t require freedom, because it doesn’t do anything unexpected. Mediocrity is the opposite of what we call “genius.” Mediocrity gets perfectly mundane things done on time. But genius is uncontrolled and uncontrollable. You cannot produce a work of genius according to a schedule or an outline. As Leonardo knew, it happens through random insights resulting from unforeseen combinations. Genius is inherently outside the realm of known disciplines and linear career paths. Mediocrity does exactly what it’s told, like the docile factory workers envisioned by Frederick Winslow Taylor.

Leonardo inseguiva in maniera costante le sue passioni e la priorità con cui seguiva i progetti non era dettata dalla commissione o dal lavoro che stava svolgendo, bensì dal suo interesse momentaneo. E finiva pochissime cose, quasi nulla. Ma ne iniziava tantissime.