Skip to content

Instantly share code, notes, and snippets.

@TimothyZhang023
TimothyZhang023 / upgrade_php7_amh.sh
Created February 5, 2015 02:48
upgrade_php7_dev
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use root to install lnmp"
exit 1
fi
#!/bin/sh
#create a new chain named SHADOWSOCKS
iptables -t nat -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
iptables -t nat -A SHADOWSOCKS -d YOUR-SERVERS-IP-ADDRESS -j RETURN
# Ignore LANs IP address
@TimothyZhang023
TimothyZhang023 / gist:4980cc492fb4208e6a60
Created March 21, 2015 05:23
树莓派上PHP7编译选项
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic --disable-fileinfo --mandir=/usr/share/man --with-bz2 --with-bz2-dir
@TimothyZhang023
TimothyZhang023 / README.md
Last active September 7, 2015 09:50 — forked from hwdsl2/.MOVED.md
IPsec L2TP VPN Auto Install Script for Ubuntu 14.04 & 12.04 and Debian 8
@TimothyZhang023
TimothyZhang023 / weibo.config
Last active March 23, 2016 05:52
新版微博宽屏界面 1366px+
{"whiteKeywords":[],"blackKeywords":[],"grayKeywords":[],"URLKeywords":[],"sourceKeywords":[],"sourceGrayKeywords":[],"userBlacklist":[],"tipBackColor":"#FFD0D0","tipTextColor":"#FF8080","readerModeIndex":false,"readerModeProfile":false,"readerModeWidth":"750","smallImgLayout":false,"customImgSize":"80","customTotalWidth":"250","customVideoSize":"120","squareAvatar":true,"moveSrcToBtm":true,"unwrapText":true,"compactFeedToolbar":false,"noHomeRightBar":true,"noHomeMargins":true,"directBigImg":false,"directAllFeeds":true,"showAllText":false,"showAllGroups":false,"showAllMsgNav":false,"showAllSonFeeds":false,"noDefaultGroupPub":false,"clearDefTopic":true,"overrideMyBack":false,"overrideOtherBack":false,"backColor":"rgba(100%,100%,100%,0.2)","overrideMySkin":false,"overrideOtherSkin":false,"skinID":"skinvip001","filterOthersOnly":false,"filterPaused":false,"filterSmiley":false,"filterName":true,"filterPromotions":true,"filterHot":true,"filterLiked":true,"filterDeleted":true,"filterTaobao":true,"filterFlood":false
@TimothyZhang023
TimothyZhang023 / ss-redir 透明代理.md
Created February 10, 2017 07:23 — forked from Tai7sy/ss-redir 透明代理.md
ss-redir 透明代理.md

##ss-redir 的 iptables 配置(透明代理)

透明代理指对客户端透明,客户端不需要进行任何设置就使用了网管设置的代理规则

创建 /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 可用,但端口一致,就设置这个
@TimothyZhang023
TimothyZhang023 / 360 pika CMakeLists.txt
Created August 22, 2017 07:57
360 pika 的 CMakeLists.txt
cmake_minimum_required(VERSION 3.2)
project(pika)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
include_directories(
"include"
"third/pink"
"third/glog/src"
"third/slash"
@TimothyZhang023
TimothyZhang023 / doge.java
Created September 8, 2017 13:19
doge.java
StringBuffer doge = new StringBuffer();
doge.append("░░░░░░░░░▄░░░░░░░░░░░░░░▄").append("\n");
doge.append("░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌").append("\n");
doge.append("░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐").append("\n");
doge.append("░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐").append("\n");
doge.append("░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐").append("\n");
doge.append("░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌").append("\n");
doge.append("░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌").append("\n");
doge.append("░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐").append("\n");
02-23 17:29:38.957 16734 16734 D Condom::pushservice: IActivityManager.removeContentProvider[android.os.BinderProxy@8fcf881, false]
02-23 17:29:38.960 16734 19996 D XMPushService Bridge: onHandleIntent -> A application want to register push
02-23 17:29:38.961 16734 19996 W XMPushService Bridge: Don't register multi request com.tencent.news
02-23 17:29:38.962 16734 19996 D Condom::pushservice: IPackageManager.getApplicationInfo[com.tencent.news, 0, 0]
02-23 17:29:38.966 16734 19996 D Condom::pushservice: IPackageManager.resolveContentProvider[top.trumeet.mipush.providers.AppProvider, 8192, 0]
02-23 17:29:38.967 1730 3307 I ActivityManager: START u0 {cmp=com.tencent.news/.ui.PushDetailActivity (has extras)} from uid 10093 pid 32605
02-23 17:29:38.968 16734 19996 D Condom::pushservice: IActivityManager.getContentProvider[android.app.ActivityThread$ApplicationThread@15a236, top.trumeet.mipush.providers.AppProvider, 0, fal
se]
02-23 17:29:38.994 16734 19996 D Condom::pushservice: IActivityManager.refContentProv