2.1 原厂固件中,直接web页面升级 2.2 已刷openwrt的话,telent/ssh登录,下载bin文件到/tmp,运行'sysupgrade -i /tmp/openwrt-ar71xx-ubnt-rspro-squashfs-sysupgrade.bin'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
###### | |
# Android wireless debugging via wifi | |
# Usage: 1. Connect your device via USB | |
# 2. run this script | |
# 3. there you go | |
###### | |
#You usually wouldn't have to modify this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"flag" | |
"log" | |
"net" | |
"io" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import requests | |
from BeautifulSoup import BeautifulSoup | |
if __name__ == '__main__': | |
fp = open('content.html', 'r') | |
content = fp.read() | |
s = time.time() | |
soup = BeautifulSoup(content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 安装 homebrew | |
2. 使用磁盘工具,分出5G空间并挂载(日志式,区分大小写) | |
3. brew install coreutils gawk wget findutils gnu-getopt | |
3.1 macos中自带的getopt不兼容,需要手动将brew目录中的gnu-getopt link到/usr/bin中 | |
4. 在trunk目录中执行make prereq,brew install安装依赖 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'oauth2' | |
require 'json' | |
OAuth2::Response.register_parser(:text, 'text/plain') do |body| | |
parsed_body = JSON.parse(body) | |
parsed_body | |
end | |
client = OAuth2::Client.new(YOU_KEY, YOU_SECRET, :site => "https://api.weibo.com", :authorize_url => "/oauth2/authorize", :token_url => "/oauth2/access_token") | |
puts client.auth_code.authorize_url(:redirect_uri => YOUR_CALLBACK_URL) | |
token = client.auth_code.get_token('authorization_code_value', :redirect_uri => YOUR_CALLBACK_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adfdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, run, sudo, local, put | |
def production(): | |
"""Defines production environment""" | |
env.user = "deploy" | |
env.hosts = ['example.com',] | |
env.base_dir = "/var/www" | |
env.app_name = "app" | |
env.domain_name = "app.example.com" | |
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |