Really easy : git diff > patchfile.pch and patch -p1 < patchfile.pch nJoy 😉
Category: Howtos
Bash While Loop Example
How do I use bash while loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using while statement? The bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. For example, run echo command 5…
Close ssh and leave a job running
Using the Job Control of bash to send the process into the background: ctrl+z to stop (pause) the program and get back to the shell bg to run it in the background disown -h so that the process isn’t killed when the terminal closes nJoy! 😉
When a MySQL table was last updated?
Simply do this: SELECT UPDATE_TIME FROM information_schema.tables WHERE TABLE_SCHEMA = ‘dbname’ AND TABLE_NAME = ‘tabname’ nJoy 😉
Set machine to a timezone
Simple and easy : ln -sf /usr/share/zoneinfo/UTC /etc/localtime nJoy 😉
Install Google Chromium on Backtrack 5 R3
Google Chrome is an alternative web browser beside Mozilla Firefox. It’s free and open source. But the problem Google Chrome on Backtrack 5 is Google Chrome can’t run in root mode. We know that Backtrack run the root mode by default. If you run the Google Chrome it won’t work. So if you want to…
How to recognize the hardware platform you are running on.
It is sometimes required especially when managing many servers to recognize the hardware setup you are running on especially if you have a zoo of different animals. Great tool for getting detailed hardware report including bios versions and memory / processor info : dmidecode While the output varies slightly across distros and sometimes you need to…
Installing Bacula Client on Centos
So the story goes like this : wget http://sourceforge.net/projects/bacula/files/latest/download?source=files tar zxvf bacula-*.tar.gz cd bacula-<fiolder> ./configure –enable-client-only make make install make install-autostart-fd nJoy 😉
Reset Mysql password from bash prompt
You can recover MySQL database server password with following five easy steps. Step # 1: Stop the MySQL server process. Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password. Step # 3: Connect to mysql server as the root user. Step # 4:…
Setting a route for a nic in Linux
In file named after the interface you want to use as gateway: e.g. /etc/sysconfig/network-scripts/route-eth0 Create entries : ADDRESS=192.168.4.0 NETMASK=255.255.255.0 GATEWAY=192.168.1.250 NnJoy 🙂