LAMP How To – Open Source At Work

Only Passion Matters

Entries for the ‘Think Linux’ Category

Removing sensitive data from git

suppose one accidentally commited a file with sensitive data ages ago, others could actually retrieve the passwd easily since git keeps a history of the changes. So the idea is to remove the file from git altogether with file changed history, then recommit the affected file (without sensitive data this time) again.
do a git [...]

compare file changed in different directories

it might be useful to compare different directories for file changed. the unix diff command rocks.
for example, this command compares 2 directories, ie blogs and blogs.bak recursively, output only the files changed and ignore any files named .git
diff -qr -x .git blogs blogs.bak

Updating ruby to version 1.9.1 in ubuntu 8.04

unfortunately, ubuntu 8.04 hardy comes with ruby version 1.8.6 by default. The latest rubygems doesn’t work well with this version. so we need to get a new version for ruby.
might want to check if you have these libraries first:

sudo apt-get install libncurses5-dev
sudo apt-get install libreadline5-dev

Download the ruby the latest source and compile it.

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz
tar -xzvf [...]

Testing emails in your local vm

testing emails can be tricky because you dont really want to send emails to real users. So we really need to turn emails service on and off as and when needed.
To stop postfix:
- stop postfix in rc.x so that it doesnt boot up with postfix started.
- /etc/init.d/postfix stop (to stop postfix if it is [...]

How to increase the size of virtual machines in Virtualbox

If you have created a 20G vm in the first place and want to double the disk size, how do you do it?? There are alot of posts in different forums but there is no easy way of doing it. However, the theory behind increasing the disk size is not difficult and should work for [...]