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
"source $VIMRUNTIME/vimrc_example.vim | |
""""""""""""""""""""""""""""""""""""""" | |
"平台判断 | |
""""""""""""""""""""""""""""""""""""""" | |
function! MySys() | |
if has("win32") | |
return "windows" | |
else | |
return "linux" |
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
b.com 127.0.0.1 |
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
do8.cc 192.168.1.160 |
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
/^\s*$/.test(el.val()) |
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
# https://gist.github.com/789378 | |
# http://rvm.beginrescueend.com/rvm/install/ | |
#!/usr/bin/env bash | |
# Install git | |
bash < <( curl http://rvm.beginrescueend.com/install/git ) | |
# Install RVM | |
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) |
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
# 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 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 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
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
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 | |
ps -Af | grep "webrick" | grep -v grep | awk '{print $2}' | xargs kill -9 | |
ruby script/server webrick -p 3000 -d | |
echo '.' |
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 | |
GITDIR ="/var/cache/git" | |
Dir.open(GITDIR).each do |d| | |
next if [".", ".."].include?(d) | |
`cd #{GITDIR}/#{d} && git pull origin master` | |
end |
NewerOlder