iptablesを直接いじりたくないのでufwを導入します。
sudo yum install wget make
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz
tar xzf ufw-0.33.tar.gz
cd ufw-0.33
sudo python ./setup.py install
<?php | |
function random_text( $type = 'alnum', $length = 8 ) | |
{ | |
switch ( $type ) { | |
case 'alnum': | |
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; | |
case 'alpha': | |
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
break; |
<?php | |
# Kafka configuration (https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) | |
$config = [ "metadata.broker.list" => "broker1.example.com", "socket.timeout.ms" => 30000, ... ]; | |
# Create Kafka Producer object. | |
# Brokers are specified through $config, but we could make it easier for people by having the first | |
# argument be brokers as well, and rdkafka will use all brokers specified? | |
$producer = new Kafka::Producer([$brokers,]? $config); |
import requests | |
from db import db | |
""" | |
The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2 | |
Base url: https://api.douban.com/v2 | |
Group info: /group/:id |
iptablesを直接いじりたくないのでufwを導入します。
sudo yum install wget make
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz
tar xzf ufw-0.33.tar.gz
cd ufw-0.33
sudo python ./setup.py install
透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则
创建 /etc/ss-redir.json 本地监听 7777
运行ss-redir -v -c /etc/ss-redir.json
iptables -t nat -N SHADOWSOCKS
# 在 nat 表中创建新链
iptables -t nat -A SHADOWSOCKS -p tcp --dport 23596 -j RETURN
# 23596 是 ss 代理服务器的端口,即远程 shadowsocks 服务器提供服务的端口,如果你有多个 ip 可用,但端口一致,就设置这个
function! WriteParams() | |
python << endpython | |
import re | |
import vim | |
# get the function definition line | |
line = vim.eval("getline(line('.'))") | |
# get the number of spaces to add to the start of the line | |
num_spaces = 4 + len(line) - len(line.lstrip()) | |
# get the line number wher to do the insertion |
^\[(.*)\] (.+?)\.([A-Z]+): (.*)
^\[
yyyy-MM-dd HH:mm:ss
1
3
2
#Unzip the IPA | |
unzip Application.ipa | |
#Remove old CodeSignature | |
rm -R "Payload/Application.app/_CodeSignature" | |
#Replace embedded mobile provisioning profile | |
cp "path-to-provisioning-profile/MyEnterprise.mobileprovision" "Payload/Application.app/embedded.mobileprovision" | |
#If you are resigning to submit to the AppStore you need to extract the entitlements to use later |