symbolically link entire directory contents
ln -s /full/dir/path/to_files /full/dir/path/destination
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
ln -s /full/dir/path/to_files /full/dir/path/destination
update-rc.d updatedb_start stop 18 6 .
update-rc.d -f tcpyspy remove
logger This is my message to syslog
:%s'replacethis'withthis'gc
git init git add . git commit -a git log (show previous commits and their unique ids) git status (show whats changed, and which files are new and untracked) git checkout [branch] (switch to [branch]) git checkout -b [new_branch_name] (creates branch and switches to it) git checkout -b [new_branch_name] [commit_id] (ditto, from particular commit) git pull . [branch] (merges [branch] into current branch) git reset --hard HEAD^ (undo last merge)
rails rproj cd rproj touch .gitignore touch log/.gitignore touch tmp/.gitignore vim .gitignore
log/*.log tmp/**/* Capfile doc/api doc/app
git init git add . git commit -a
git checkout -b hours
git add . git commit -a
git checkout master git pull . hours
git reset --hard HEAD^
git checkout hours [do some changes, no new files] git commit -a git checkout master git pull . hours
git branch -D hours
git log (copy the commit id for the first commit on master) git checkout -b more_features [commit_id]
git commit -a git checkout master git pull . more_features
select * into outfile '/tmp/outfile.txt' fields terminated by ',' from my_table_name;
gdb /usr/local/bin/ruby [PID]
ulimit -c 512
# Cmnd alias specification Cmnd_Alias HTTPD = /usr/local/sbin/apachectl, /etc/init.d/apache2 # User privilege specification [user] ALL = NOPASSWD: HTTPD
mysqladmin -u [user] -h localhost -p password '[new_password]'
<?php $link = mysql_connect('localhost','mydbuser','mydbpassword'); if (!$link) { die('Could not connect to MySQL: ' . mysql_error()); } echo 'mySql Connection OK'; mysql_close($link); $dbh = new PDO('mysql:host=localhost;dbname=test','mydbuser','mydbpassword'); if ($dbh) { echo 'mysql_pdo CONNECTION OK'; } else {echo 'mysql_pdo ERROR';} ?>