This file contains hidden or 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
| "source $VIMRUNTIME/vimrc_example.vim | |
| """"""""""""""""""""""""""""""""""""""" | |
| "平台判断 | |
| """"""""""""""""""""""""""""""""""""""" | |
| function! MySys() | |
| if has("win32") | |
| return "windows" | |
| else | |
| return "linux" |
This file contains hidden or 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 | |
| # 自动同步 dyndns | |
| # 事先检查可以防止dyndns 抛 abuse | |
| DOMAIN = "xxx.dyndns-ip.com" | |
| USER_PWD = "xxx:yyy" | |
| IPREGX = /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ |
This file contains hidden or 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
| # m h dom mon dow command | |
| # 0 3 * * * cd /var/www/do8 && /usr/bin/rake backup:log:all > /dev/null 2>&1 | |
| # 5 3 * * * cd /var/www/do8 && /usr/bin/rake backup:db:mysql RAILS_ENV=production > /dev/null 2>&1 | |
| # https://gist.github.com/787497 | |
| require 'fileutils' | |
| namespace :backup do | |
| desc 'backup log' | |
| namespace :log do |
This file contains hidden or 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
| # upload your file to tu.6.cn | |
| # short url by tinyurl | |
| # copy the url to you clipboard | |
| require 'rubygems' | |
| require "win32/clipboard" | |
| include Win32 | |
| $filename = ARGV[0] | |
| TYPES = %w{.jpg .gif .png .jpeg} |
This file contains hidden or 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
| # http://gist.github.com/466673 | |
| # upload your file to tu.6.cn | |
| # short url by tinyurl | |
| # copy the url to you clipboard | |
| require 'rubygems' | |
| require "win32/clipboard" | |
| include Win32 | |
| $filename = ARGV[0] |