Skip to content

Instantly share code, notes, and snippets.

@ledudu
ledudu / how to install entware on ARM.md
Created June 30, 2016 01:38 — forked from dreamcat4/how to install entware on ARM.md
Install entware on ARM based router eg tomato / ddwrt / asus-merlin cfw
@ledudu
ledudu / howto-tomato-install-entware.markdown
Created October 22, 2015 11:23 — forked from dferg/howto-tomato-install-entware.markdown
HOWTO: Install entware on Shibby TomatoUSB

Introduction

This howto describes installing entware for the Tomato open-source router firmware.

Requirements

  • USB stick - 1G or more in size
  • USB-capable router running TomatoUSB.

This Howto Was Tested With

@ledudu
ledudu / readme.txt
Last active August 29, 2015 14:19 — forked from fqrouter/readme.txt
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import string
try:
import pycurl2 as pycurl
except:
import pycurl
import urllib
class V2exHandler(webapp2.RequestHandler):
def get(self, cmd):
return
if cmd == 'daily':
url = 'http://v2ex.com/signin'
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31'),
('Referer', 'http://v2ex.com/signin')]
res = opener.open(url)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import string
try:
import pycurl2 as pycurl
except:
import pycurl
import urllib
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import time
from bs4 import BeautifulSoup
signin_url = "http://www.v2ex.com/signin"
award_url = "http://www.v2ex.com/mission/daily"
main_url = "http://www.v2ex.com"
<?php
/**
* V2EX每日奖励自动领取脚本 - PHP / Selenium版
*
* 使用前需要准备的:
* Oracle Java Runtime - http://java.com/
* Selenium Server - http://seleniumhq.org/
* PHP - http://php.net/
* PHP-WebDriver - https://github.com/Element-34/php-webdriver
* Firefox - http://mozilla.org/
@ledudu
ledudu / xiami.php
Created August 27, 2013 13:32 — forked from lizheming/xiami.php
<?php
set_time_limit(0);
/*输入账号密码*/
$name = '';
$password = '';
//获取登陆cookie
$curl_post = 'email='.$name.'&password='.$password.'&done=/&submit=登 录';
$cookie_file = dirname(__FILE__).'/cookie.txt';
$curl = curl_init();