This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
备份CC脚本 | |
crontab -e | |
0 2 7 * * ~/scripts/backup_cc >/dev/null 2>&1 | |
vi ~/scripts/backup_cc | |
#!/bin/sh | |
tar -zcvf ~/backup_cc/svn_$(date +%F_%H%M%S).tar ~/.svnroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# - indent | |
# OP javascript indentation : This indentation script for OOP javascript (especially for EXTJS) | |
# http://www.vim.org/scripts/script.php?script_id=1936 | |
echo "-install indent " | |
cd ~/.vim/indent || mkdir -p ~/.vim/indent | |
wget http://www.vim.org/scripts/download_script.php?src_id=7708 -O ~/.vim/indent/javascript.vim | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build ssh key | |
ssh-keygen -t rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy public key to the clipboard | |
sudo apt-get install xclip | |
cat id_dsa.pub | xclip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy public key to the clipboard | |
sudo apt-get install xclip | |
cat id_dsa.pub | xclip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= snippet | |
String random : Gist 164989 | |
bash alias : Gist 162611 | |
rspec model test : Gist 163176 | |
merge git version : Gist 168847 | |
ext croe use google cdn : Gist 171726 | |
jquery croe use google cdn : Gist 144591 | |
jquery window popup a iframe : Gist 290d8e313ddea49752e8 | |
install agi-vim : Gist 173665 | |
shell gist : Gist 173672 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo git remote add -f alvin-gist git://gist.github.com/166924.git | sh | |
echo git checkout -b alvin-gist/master | sh | |
echo git pull alvin-gist master | sh | |
echo git checkout master | sh | |
echo git merge alvin-gist/master | sh | |
echo git push | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'optparse' | |
options = Hash.new() | |
opts = OptionParser.new() do |opts| | |
opts.on_tail("-h", "--help", "get help for this CMD") { | |
print(opts) | |
exit() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To show deleted files use the command: | |
git ls-files -d | |
To restore the deleted files use: | |
git ls-files -d | xargs git checkout -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vnc 退出全屏 | |
ctrl+alf+shift+f |
OlderNewer