Git::Basic settings

Add .git_completion.sh to your home directory, and add this to your .bash_profile:

 

source ~/.git_completion.sh

function parse_git_dirty {
  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}

function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}

export PS1='\h:\W$(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[0m\]]")$ '

Linux: Runlevel configuration tool to start service on Ubuntu/Debian

Under Debian or Ubuntu based distro, use the runlevel configuration tool to manage services run levels

To turn on mongodb service, use the following command:

update-rc.d mongodb defaults

you may to sudo:

sudo update-rc.d mongodb defaults

To remove service, use

update-rc.d mongodb defaults

or using sudo:

sudo update-rc.d mongodb defaults

Windows 7: Emulate CD/DVD Media on your machine.

Windows 7: Emulate CD/DVD Media on your machine.

I have been happy with Virtual CloneDrive for quite a while now. Today I stumbled upon a .NRG image that it won't mount as a drive and I wanted to have that image in a more popular format.

After some hunting, I decided to go for Daemon Tools, as they offer a free-for-personal-no-comercial license for their lite version of the product.

http://www.daemon-tools.cc/eng/downloads

Linux:: SSH configuration file

To save some typing you can create aliases to the servers you frequently access via ssh. This can be accomplished by either editing the global file ( /etc/ssh/ssh_config ), if you’re root and and to make changes for all the users, or your own config file ( $HOME/.ssh/config ).

Follow the example, and remember to customize to your needs

Host *
Compression yes
Port 22
ForwardAgent yes

Host sample
HostName host.sample_of_a_very_long_host_name.com
User joe
ForwardAgent yes
Port 22
Compression yes

Now you can ssh into that server using:

ssh sample

Squeeze: Setting up compiz on Debian Squeeze

My laptop has a nVidia Geforce 8660M GT, so I’m installing nVidia drivers

follow this: http://wiki.debian.org/NvidiaGraphicsDrivers

apt-get install module-assistant nvidia-kernel-common
m-a auto-install nvidia-kernel${VERSION}-source

Let’s go for the eye candy

sudo apt-get install compiz compizconfig-settings-manager compiz-fusion-plugins-main

Follow this:

http://wiki.debian.org/Compiz