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
set-option -g prefix C-a | |
# If we perform "unbind-key a" within a keybind | |
# It will have very high probability to crash | |
bind-key u unbind-key -a | |
# Following code shows a general use case: | |
# * I want to unbind all keys in .tmux.conf, then bind everything by myself | |
# * I need a hotkey to reload my .tmux.conf script | |
# When I try to reload, tmux server crashes. |
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
#include <vector> | |
#include <list> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <stack> | |
#include <bitset> | |
#include <algorithm> | |
#include <functional> | |
#include <numeric> |
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
#include <iostream> | |
#include <vector> | |
#include <set> | |
#include <map> | |
#include <deque> | |
#include <cstdio> | |
#include <cassert> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cmath> |
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
# This is derived version of https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
$KCODE='UTF8' | |
require 'rubygems' | |
require 'sequel' | |
require 'fileutils' | |
require 'yaml' | |
require 'ya2yaml' | |
module Jekyll |
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
#include <vector> | |
#include <list> | |
#include <map> | |
#include <set> | |
#include <deque> | |
#include <stack> | |
#include <bitset> | |
#include <algorithm> | |
#include <functional> | |
#include <numeric> |
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
sample = 10000 | |
change = 0 | |
not_change = 0 | |
$verbose = true | |
def log(s) | |
puts s if $verbose | |
end |
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
參考xdite's blog http://blog.xdite.net/?p=1839 | |
建立一個名為railsc的執行檔,以monkey patch的方式啟用wirble及hirb | |
將railsc存到你PATH下,並設定可執行(chmod 755) | |
執行railsc取代rails c,即可載入wirble及hirb,不用修改project directory下的東西 | |
P.S. | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
這個我還是寫在.irbrc裡(事實上我是用show_log和hide_log開關) |
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
module Hello | |
def self.const_missing(name) | |
"Constant #{name}" | |
end | |
puts ABC # Constant ABC | |
end | |
puts DEF # uninitialized constant DEF (NameError) |
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
``` | |
ls -al; | |
second line | |
``` |
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
git clone -u /home2/username/bin/git-upload-pack [email protected]:~/repo/$1 | |
cd $1 | |
repo-config $1 |