start new:
tmux
start new with session name:
tmux new -s myname
http://tioga.rubyforge.org/index.html |
while [ $? -eq 0 ];do nc -vlp 8888 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed "s/[^a-z0-9_.-]//gi"`;h="HTTP/1.1";o="$h 200 OK";c="Content";hd="$c-Type: text/html; charset=utf-8";if [ -z $f ];then($e "$o";$e $hd;$e;ls|(while $r n;do if [ -f "$n" ]; then $e "<a href=\"/$n\">`ls -gh $n`</a><br>";fi;done););elif [[ $f =~ eggs ]];then($e "$o";$e $hd;$e;curl http://labs.douban.com/doublo/eggs?k=`$e $f|sed "s/eggs//gi"` 2>/dev/null;);elif [ -f $f ];then $e "$o";$e "$c-Type: `file -ib $f`";$e "$c-Length: `stat -c%s $f`";$e;cat $f;else $e -e "$h 404 Not Found\n\n404\n";fi)';done |
# ----------------------------------------------------------------- | |
# 本程序提供最基本的Douban OAuth认证的Ruby示例代码 | |
# 更多其他语言版本的Douban OAuth认证示例代码在 http://code.google.com/p/douban-oauth-sample/ 上提供 | |
# 有任何疑问,可以到 http://www.douban.com/group/dbapi/ 上提问 | |
# ----------------------------------------------------------------- | |
# Douban OAuth认证包括以下四步内容 | |
# | |
# 1. 获取Request Token | |
# 2. 用户确认授权 |
#!/usr/bin/env ruby | |
# ^ 1.8.x or 1.9, folks! | |
require 'rubygems' | |
require File.expand_path('./md_izer', File.dirname(__FILE__)) | |
render_options = { | |
:fenced_code_blocks => true, | |
:autolink => true, | |
:space_after_headers => true |
// 2012 new version | |
// 点击logo到广播 | |
$('.site-nav-logo a').attr('href', 'http://www.douban.com/update/'); | |
// 按"."刷新广播,与twitter快捷键一致 | |
$('body').keypress( | |
function (e) { | |
var code = e.charCode ? e.charCode : e.keyCode; | |
if (code === 46 && !$(':focus').is(':input')) { | |
// '.' to reload |
# ----------------------------------------------------------------- | |
# 本程序提供最基本的Douban OAuth认证的Ruby示例代码 | |
# 更多其他语言版本的Douban OAuth认证示例代码在 http://code.google.com/p/douban-oauth-sample/ 上提供 | |
# 有任何疑问,可以到 http://www.douban.com/group/dbapi/ 上提问 | |
# ----------------------------------------------------------------- | |
# Douban OAuth认证包括以下四步内容 | |
# | |
# 1. 获取Request Token | |
# 2. 用户确认授权 |