Skip to content

Instantly share code, notes, and snippets.

View RobinWu's full-sized avatar

吴少斌 RobinWu

View GitHub Profile
备份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
#!/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
build ssh key
ssh-keygen -t rsa
copy public key to the clipboard
sudo apt-get install xclip
cat id_dsa.pub | xclip
copy public key to the clipboard
sudo apt-get install xclip
cat id_dsa.pub | xclip
= 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
#!/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
#!/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()
}
To show deleted files use the command:
git ls-files -d
To restore the deleted files use:
git ls-files -d | xargs git checkout --
vnc 退出全屏
ctrl+alf+shift+f