Add a Remote User in MySQL Server

GRANT ALL PRIVILEGES ON *.* TO user@'%' IDENTIFIED BY 'pass' WITH GRANT OPTION;

mkdir recursive

mkdir -p /your/long/path

Fix *** [err :: 11.15.19.46] find: `/path/to/your/releases/RELEASE_NUMBER/public/images’ (capistrano)

add this line to deploy.rb

set :normalize_asset_timestamps, false

GIT diff between files in different commit

git diff START_COMMIT..END_COMMIT -- path/to/your/file

Create local branch from remote branch (GIT)

git checkout -b BRANCH_NAME origin/BRANCH_NAME

or

git fetch origin origin/BRANCH_NAME:BRANCH_NAME

Auto start Apache on CentOS (start on boot)

/sbin/chkconfig --levels 235 httpd on

Duplicate MySQL database

mysqldump -u [USER] --password=[PASSWORD] -h [HOST] [DATABASE_TO_COPY] | mysql -u [USER] --password=[PASSWORD] -h [HOST] [COPY_TO_DATABASE]

Export GIT Repo (zip)

git archive --format zip --output /path/to/zipfile.zip master 

convert tab to space (vim)

:set expandtab tabstop=4 shiftwidth=4

Remove .svn file or folder

find -name '.svn' -type d -print | xargs rm -rf {}
rm -rf `find . -type d -name .svn`
Page 3 of 1012345...10...Last »