Skip to content

Instantly share code, notes, and snippets.

View mengskysama's full-sized avatar
💭
I may be slow to respond.

mengskysama mengskysama

💭
I may be slow to respond.
View GitHub Profile
@mengskysama
mengskysama / sad.png
Last active August 29, 2015 14:07
Optimizing Shadowsocks
1
import os
import re
class Iptables(object):
_iptables = 'iptables'
@classmethod
def get_chain(cls):
import urllib2
import re
for i in range(100000):
try:
response = urllib2.urlopen('http://www.freexs.cn/info/%s.htm' % i)
t = re.findall('<h1>([\S\s]+?)</h1>', response.read())[0]
print i, t
except:
print i
location ~ /(\d+)(.*) {
set $size $1;
set $unit $2;
access_by_lua_block {
local sent = 0
local bufsize = 8192
local payload = string.rep("0", bufsize)
local _u = ngx.var.unit
if _u ~= nil and _u ~= "" then
_u = string.lower(_u)
FFmpeg has been removed from Ubuntu 14.04 and was replaced by Libav. This decision has been reversed so that FFmpeg is available now in Ubuntu 15.04 again, but there is still no official package for 14.04. In this tutorial, I will show you how to install FFmpeg from mc3man ppa. Add the mc3man ppa:
sudo add-apt-repository ppa:mc3man/trusty-media
And confirm the following message by pressing <enter>:
Also note that with apt-get a sudo apt-get dist-upgrade is needed for initial setup & with some package upgrades
More info: https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media
Press [ENTER] to continue or ctrl-c to cancel adding it
Update the package list.
local redis_c = require "resty.redis"
local ok, new_tab = pcall(require, "table.new")
if not ok or type(new_tab) ~= "function" then
new_tab = function (narr, nrec) return {} end
end
local _M = new_tab(0, 155)
@mengskysama
mengskysama / trackerhack
Created June 26, 2017 13:24
trackerhack
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.httpclient
import re
from tornado.options import define, options
from tornado import gen
@mengskysama
mengskysama / VMware.py
Created December 28, 2017 02:36
one provider create vm script without bypass cf
#import gevent
#from ghost import Ghost, Session
import requests
import re
import json
import time
import socket
#from gevent import monkey; monkey.patch_all()
timeout = 90
socket.setdefaulttimeout(timeout)
@mengskysama
mengskysama / vm.py
Last active March 23, 2024 02:39
one provider create vm script without bypass cf
#import gevent
#from ghost import Ghost, Session
import requests
import re
import json
import time
import socket
#from gevent import monkey; monkey.patch_all()
timeout = 90
socket.setdefaulttimeout(timeout)
@mengskysama
mengskysama / nginx.conf
Last active April 13, 2018 09:14
https upstream
server {
resolver 114.114.114.114;
listen 8989;
location ^~ / {
proxy_ssl_verify off;
proxy_pass https://api.weixin.qq.com;
}
}