Metro界面无解。
Candy版: http://candy-sky.net/2014/01/21/mactype-20131231/ Baidu Yun:
import os | |
import struct | |
import socket | |
state_table = ( | |
"EMPTY SLOT", | |
"ESTABLISHED", | |
"SENT", | |
"RECV", | |
"WAIT1", |
#!/bin/bash | |
if [[ $# != 1 && $# != 2 ]] | |
then | |
echo "$0 <path to git repository> [tree-ish]" | |
exit 1 | |
fi | |
msg() { | |
echo -e -n "\e[32;1m==>\e[0m " |
from time import sleep | |
import tornado | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
class BackgroundMix(tornado.web.RequestHandler): | |
"""将block任务放入线程池中执行 | |
EXAMPLE: | |
# blocking task like querying to MySQL |
Metro界面无解。
Candy版: http://candy-sky.net/2014/01/21/mactype-20131231/ Baidu Yun:
#!/usr/bin/expect | |
set timeout 60 | |
spawn /usr/bin/ssh -D 7070 -g username@yourserver.com | |
#这里的 username 为你自己的用户名,yourserver.com 为你自己的服务器域名或ip | |
expect { | |
"password:" { | |
send "password\r" | |
#将第二个 password 改为你自己的密码 | |
} |
#!/bin/bash | |
# 参数1:延迟的时间,单位s | |
# 参数2:需要执行的命令 | |
# example: | |
# delay 10 "conky -d" | |
sleep $1 | |
exec $2 |
# 在本地服务器建立 rubygems.org 的镜像缓存,以提高 gem 的安装速度 | |
# 此配置设置缓存过期为1天,也就是说,新上的 gem 无法马上安装 | |
# 做这个起什么作用? | |
# rubygems 的很多资源文件是存放到 Amazon S3 上面的,由于 GFW 对某些 S3 服务器又连接重置或丢包,导致 gem 安装异常缓慢或有时候根本无法连接安装。 | |
# 而通过这种跳板的方式可以很好的解决这个问题,当然前提是 Nginx反向代理 服务器需要在国外 | |
proxy_cache_path /var/cache/rubygems levels=1:2 keys_zone=RUBYGEMS:10m | |
inactive=24h max_size=1g; | |
server { | |
listen 80; |
# Create a user land file for testing. | |
# dd if=/dev/urandom of=/tmp/urandom bs=1M count=10 | |
# | |
# urandom-reads.py infile threads | |
# Examples: | |
# time python2.6 urandom-reads.py /tmp/urandom | |
# time python2.6 urandom-reads.py /dev/urandom | |
# | |
# R to generate a plot of the read time distribution at each level of concurrency | |
# rdt = read.csv("output.csv", header=F) |
require 'gollum/frontend/app' | |
require 'digest/sha1' | |
class App < Precious::App | |
User = Struct.new(:name, :email, :password_hash, :can_write) | |
before { authenticate! } | |
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end | |
helpers do |