As configured in my dotfiles.
start new:
tmux
start new with session name:
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
apply plugin: 'java' | |
project.version = "1.0" | |
try { | |
new ByteArrayOutputStream().withStream { os -> | |
def result = exec { | |
executable = 'svn' |
#!/bin/bash | |
echo -ne "\033[0;33m" | |
cat<<EOT | |
_oo0oo_ | |
088888880 | |
88" . "88 | |
(| -_- |) | |
0\ = /0 | |
___/'---'\___ |
# use C+b as escape key | |
escape ^Bb | |
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 |
As configured in my dotfiles.
start new:
tmux
start new with session name:
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null |
; Comments start with semicolons. | |
; Clojure is written in "forms", which are just | |
; lists of things inside parentheses, separated by whitespace. | |
; | |
; The clojure reader assumes that the first thing is a | |
; function or macro to call, and the rest are arguments. | |
; | |
; Here's a function that sets the current namespace: | |
(ns test) |
/** | |
* 新浪微博mid与url互转实用工具 | |
* 作者: XiNGRZ (http://weibo.com/xingrz) | |
*/ | |
var WeiboUtil = { | |
// 62进制字典 | |
str62keys: [ | |
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", | |
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", |