Skip to content

Instantly share code, notes, and snippets.

View everyx's full-sized avatar

Gavin Luo everyx

View GitHub Profile
@everyx
everyx / .env
Created December 18, 2020 02:53
OctoberCMS v1.1.1 config with s3 filesystem
FILESYSTEM_DEFAULT=s3
FILESYSTEM_PATH=https://cdn.mydomain.com/my-project
FILESYSTEM_S3_KEY=********************
FILESYSTEM_S3_SECRET=*******************************************
# I use digitalocean space which is compatiable with AWS s3
FILESYSTEM_S3_ENDPOINT=https://sfo1.digitaloceanspaces.com
FILESYSTEM_S3_URL=https://cdn.mydomain.com/my-project
# I also try this
# FILESYSTEM_S3_URL=https://cdn.mydomain.com
FILESYSTEM_S3_REGION=sfo1
(function anonymous(
) {
(function() {
var hostname = window.location.hostname;
var currURL = window.location.href;
var path = window.location.pathname;
var Cookie = {
get: function(name) {
var cookies = document.cookie.split(';');
for (var i = 0, j = cookies.length; i < j; i++) {
@everyx
everyx / enable_pacproxy.bat
Last active April 25, 2023 20:55
A batch script to enable proxy via a proxy file.
@echo off
goto enable-pacproxy
:enable-pacproxy
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://192.168.0.10:8093/pac" /f
goto end
:disable_proxy
@everyx
everyx / bestroutetb_generator_shadowsocks.sh
Last active July 23, 2018 14:21
使用 bestroutetb 生成为 shadowsocks 透明代理需要的 shell 脚本
#!/usr/bin/bash
filename=$'iptables.shadow'
bestroutetb -p custom -o $filename --rule-format=$'iptables -t nat -A SHADOWSOCKS -d %prefix/%mask -j %gw\n' --gateway.net=RETURN --gateway.vpn=ACCEPT --header=$'#!/usr/bin/sh\niptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 1080\niptables -t nat -A SHADOWSOCKS -d MY_SS-REDIR_SERVER_IP -j RETURN\n\n' --footer=$'\niptables -t nat -A SHADOWSOCKS -p tcp -j REDIRECT --to-ports 1080\niptables -t nat -A PREROUTING -p tcp -j SHADOWSOCKS\n'
if [ -f "$filename" ]; then
sed -e '/-j ACCEPT/d' $filename > tmp
rm $filename
mv tmp $filename
fi
############## HEADER HERE
# Create new chain
iptables -t nat -N SHADOWSOCKS
# Ignore your shadowsocks server's addresses
# It's very IMPORTANT, just be careful.
iptables -t nat -A SHADOWSOCKS -d MY_SS-REDIR_SERVER_IP -j RETURN
# Ignore LANs and any other addresses you'd like to bypass the proxy
# See Wikipedia and RFC5735 for full list of reserved networks.