use wormhole to solve inconsistency caused by cache


all applications subscribe to the wormhole which published logs in order to invalidate cache

replication types


Replication works because events written to the binary log are read from the master and then processed on the slave. The events are recorded within the binary log in different formats according to the type of event.

Two types: row-based replication and statement-based replication

create symlink

How do I create soft link / symbolic link?

To create a symbolic link in Unix or Linux, at the shell prompt, enter the following command:
ln -s {target-filename} {symbolic-filename}

For example create softlink for /webroot/home/httpd/ as /home/vivek/index.php, enter the following command:
ln -s /webroot/home/httpd/ /home/vivek/index.php
ls -l


lrwxrwxrwx 1 vivek  vivek    16 2007-09-25 22:53 index.php -> /webroot/home/httpd/

git patch


  1. git format-patch HEAD^n..HEAD  (it patches the commit excludes the last nth and includes the head; e.g., n = 1, then it patches only the last commit), then you will see a file usually beginning with 00.
  2. scp the patched file to the destination, another machine or maintainer
  3. on the destination, git am patch_file_path (the patched file has directory information of the repository, so it does not matter under which directory you run this command)


screen workflow:

  1. screen : open a new window2 in an existing window1
  2. run commands on that window2
  3. ctrl + a then +d : de-attach the window2 and back to the old window1
  4. screen -x : at window1, go to the de-attached window2

Terminate a screen: ctrl+d

open a new screen: screen

deattach to a screen: ctrl+a, d

go to an existing screen: screen -x

go to a specific screen: screen -x 12335