start new:
tmux
start new with session name:
tmux new -s myname
logger () | |
{ | |
time=`TZ="Asia/Shanghai" date +"%Y-%m-%d %T"`; | |
echo "[$time] $*" | |
} | |
filesize () | |
{ | |
/bin/ls -alF "$1" | awk '{print $5}' | |
} |
import java.nio.ByteBuffer; | |
import java.util.Random; | |
public class BufferPerformanceComparison { | |
public final static int MEGA_BYTE = 1024 * 1024; | |
public final static long GIGA_BYTE = MEGA_BYTE * 1024; | |
private final ByteBuffer heapByteBuffer; | |
private final ByteBuffer offHeapByteBuffer; | |
private final long dataToLoad; | |
private final int bufferSize; |
<?php | |
/** | |
* A thin kestrel client that wraps Memcached (libmemcached extension) | |
* | |
* @author Bill Shupp <hostmaster@shupp.org> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_KestrelClient | |
{ | |
/** |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'python.vim' | |
Bundle 'taglist.vim' | |
Bundle 'TWiki-Syntax' |
import ro.isdc.wro.model.resource.* | |
import ro.isdc.wro.extensions.processor.js.* | |
buildscript { | |
repositories { mavenCentral() } | |
dependencies { | |
classpath "ro.isdc.wro4j:wro4j-extensions:${versions.wro4j}" | |
} | |
} |
/** | |
* 新浪微博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", |
; 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) |
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 |
As configured in my dotfiles.
start new:
tmux
start new with session name: