访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]
进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。
| #!/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 |
分布式系统的核心是分布式通信,而传统上开发一套支持上千台规模集群,可靠性非常高的分布式通信框架,需要不少的精力投入。而在多数情景下,我们(特别是时间宝贵的OP)并不是非常关注技术实现的细节,而是希望有一套成熟、轻量、可靠性高、使用方便而且易于调试的分布式通信框架,可以直接使用,从而把时间放在具体业务逻辑上。
在PyCon 2012大会上,dotcloud公司开源了一套基于ZeroMQ和MessagePack的分布式通信框架(或者说是协议+Python实现)。该框架因为基于ZeroMQ,使用方法是RPC,所以被命名为ZeroRPC。ZeroRPC的特点在其官网的介绍中一目了然[1]:
ZeroRPC is a light-weight, reliable and language-agnostic library for distributed communication between server-side processes.
Metro界面无解。
Candy版: http://candy-sky.net/2014/01/21/mactype-20131231/ Baidu Yun:
| # 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) |
| - What do Etcd, Consul, and Zookeeper do? | |
| - Service Registration: | |
| - Host, port number, and sometimes authentication credentials, protocols, versions | |
| numbers, and/or environment details. | |
| - Service Discovery: | |
| - Ability for client application to query the central registry to learn of service location. | |
| - Consistent and durable general-purpose K/V store across distributed system. | |
| - Some solutions support this better than others. | |
| - Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state. | |
| - Centralized locking can be based on this K/V store. |
| import os | |
| import struct | |
| import socket | |
| state_table = ( | |
| "EMPTY SLOT", | |
| "ESTABLISHED", | |
| "SENT", | |
| "RECV", | |
| "WAIT1", |