Skip to content

Instantly share code, notes, and snippets.

View everyx's full-sized avatar

Gavin Luo everyx

View GitHub Profile
@everyx
everyx / FCInfo_en_Ver_1-29b-rmu_Docked_PySide6.FCMacro
Last active July 20, 2024 07:16 — forked from mario52a/FCInfo_en_Ver_1-30c-rmu_Docked.FCMacro
Gives a series of informations about the selected shape and can display a conversion of length, inclination (degrees, radians, grades, pourcent) shape, surface, volume and the weight of the form in the density selected in different units of quantities international and Anglo-Saxon. (English version & PySide6)
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
***************************************************************************
* Copyright (c) <mario52> 2014 2015 2016 2017 2018 2019 2020 2021 2022 *
* 2023 2024 *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
@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.