访问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 " |
| 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 |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| /* | |
| 12306 Auto Query => A javascript snippet to help you book tickets online. | |
| Copyright (C) 2011-2012 Jingqin Lynn | |
| Includes jQuery | |
| Copyright 2011, John Resig | |
| Dual licensed under the MIT or GPL Version 2 licenses. | |
| http://jquery.org/license | |
| Includes Sizzle.js |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/ | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| # 在本地服务器建立 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; |
| #!/bin/bash | |
| # 参数1:延迟的时间,单位s | |
| # 参数2:需要执行的命令 | |
| # example: | |
| # delay 10 "conky -d" | |
| sleep $1 | |
| exec $2 |
| #!/usr/bin/expect | |
| set timeout 60 | |
| spawn /usr/bin/ssh -D 7070 -g [email protected] | |
| #这里的 username 为你自己的用户名,yourserver.com 为你自己的服务器域名或ip | |
| expect { | |
| "password:" { | |
| send "password\r" | |
| #将第二个 password 改为你自己的密码 | |
| } |
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |