Thursday, February 18, 2010

Linux: Removing kernal image

Whoa,
When you have lots of kernel to delete, its just not right to run update-grub on every removal...
its waste of time and lots of harddisk spinning.

So, move your /usr/sbin/update-grub and update-grub2 to somewhere else before you remove any of the kernal image.

When you are done, move back those 2 files...
Then run:
sudo update-grub

this save HOURS of your time ! :)
hope it helps...

Ubuntu Tweak

Wow,
Its been sometime i've been on ubuntu...
And i start to realise, my kernel update has been piling up on my grub boot list.
Uninstalling it doesnt help in removing the grub list, and i dont keen to edit the grub configuration manually...
So, i went on googling as usual, and found this post:

http://ubuntuforums.org/showthread.php?t=818177

And to my amazement, i found an application alike "ccleaner" in windows...
http://ubuntu-tweak.com/

Its an amazing piece of work :)
Well done to the developer :)

Thursday, February 4, 2010

GIT Howto sync to remote via push?

From CVS to SVN, and now GIT.
Git is the latest version control system created by Linus,
a big applause to him, one of opensource greatest gurus and leader :)

How to use?
1st, local:
cd to your source directory
type:
git init
git add .
git commit

next, ssh into your remote host,
example: /home/myname
mkdir mygit
cd mygit
git init
git config --bool core.bare true

go back to local source directory
type:
git push ssh://myname@[host]:port#/home/myname/mygit master
git config remote.origin.url ssh://myname@[host]:port#/home/myname/mygit

Done!
Updates: mar 3, 2011:
Later version of git forbids pushing an existing git.
So, you may just upload the .git directory from your local source directory to remote directory:
Example /home/myname/mygit/.git -> (remote) /home/myname/mygit/.git
Next, run git config --bool core.bare true (on remote machine)
Then, you may run git config to setup the git default push and pull on local machine.
Both copy shall have the same version :)

So if you ever want to push to remote again, simply type:
git push

And to update, type:
git pull

And if you are sharing this git with someone else to commit, you may set it to :
git config core.sharedRepository true

And make sure all users of the git should have the same group name.

To add a user to the git:
/usr/sbin/useradd -g groupname newusername
sudo passwd newusername

next, set the permission to the git directory on remote
chmod g+w -R .


Reference: