I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
参考了以下两篇文献: http://blog.ch3n2k.com/2013/09/openwrt.html http://www.right.com.cn/forum/thread-128967-1-1.html
tomato路由器上已经成功部署,并且一直很稳定,openwrt的部署步骤是我按照上面的两篇文献以及tomato上的部署经验写的,但我没有真正搭建过。下面是详细的解决方案:
#一、tomato路由器
1、设置好jffs和ipkg安装环境;把附件中的geoip压缩包的内容放入/opt/etc/geoip
(或者/jffs/opt/etc/geoip
)目录下。
2、在系统管理——脚本设置——wan连线中输入以下内容:
//===================================================================================================== | |
// IMU.c | |
// S.O.H. Madgwick | |
// 25th September 2010 | |
//===================================================================================================== | |
// Description: | |
// | |
// Quaternion implementation of the 'DCM filter' [Mayhony et al]. | |
// | |
// User must define 'halfT' as the (sample period / 2), and the filter gains 'Kp' and 'Ki'. |
#!/usr/bin/env python | |
import os | |
import sys | |
from gevent import monkey | |
from psycogreen.gevent import patch_psycopg | |
# The threading module raises a KeyError if already loaded | |
# when monkey patching it. | |
if "threading" in sys.modules: |
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
#!/usr/bin/env python | |
# coding=utf8 | |
# author=evi1m0 | |
# website=linux.im | |
''' | |
12306 Captcha Picture: | |
author: Evi1m0@20150316 | |
1. Download Captcha | |
2. Pic Conver Text |
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
from subprocess import Popen, PIPE | |
cmd = 'cat | head -5' | |
proc = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
outs, errs = proc.communicate(input=""" | |
Popen.communicate(input=None, timeout=None) | |
Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be data to be sent to the child process, or None, if no data should be sent to the child. The type of input must be bytes or, if universal_newlines was True, a string. | |
communicate() returns a tuple (stdout_data, stderr_data). |