I hereby claim:
- I am vimagick on github.
- I am vimagick (https://keybase.io/vimagick) on keybase.
- I have a public key ASCYaaWA0pKAzSqUKYQZKKaFXfQ0OjjeNwQy1sScAWSuKQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function FindProxyForURL(url, host) { | |
return "DIRECT"; | |
} |
#!/bin/sh | |
WG_HOSTS="192.168.X.1 192.168.Y.1 192.168.Z.1" | |
WG_IFACE=wg | |
for host in $WG_HOSTS; do | |
ping -q -W 1 -i 2 -c 3 $host || { ifup $WG_IFACE; break; } | |
done |
#!/bin/bash | |
# enable ip forwarding | |
sudo sysctl -w net.inet.ip.forwarding=1 | |
# disable pf firewall | |
sudo pfctl -d | |
# flush nat rules | |
sudo pfctl -F nat |
#!/bin/bash | |
CONTAINER_NAME=${1:?container name is empty} | |
NETWORK_MODE=$(docker inspect -f "{{.HostConfig.NetworkMode}}" $CONTAINER_NAME) | |
STATE_PID=$(docker inspect --format '{{.State.Pid}}' $CONTAINER_NAME) | |
VETH_NAME= | |
if [[ $NETWORK_MODE = "host" ]]; then | |
VETH_NAME="host" | |
else |
#!/usr/local/bin/bash | |
# | |
# Background Music / Sound Effects Downloader | |
# | |
BASE_URL=https://www.tukuppt.com | |
IDX_URL=$BASE_URL/peiyueso/shipin5097/__zonghe_0_0_0_0_0_0_%d.html | |
#IDX_URL=$BASE_URL/yinxiaomuban/shipin/__zonghe_0_0_0_0_0_0_%d.html | |
API_URL=$BASE_URL/api/audio | |
TOTAL_PAGES=46 |
#!/usr/bin/env python3 | |
# | |
# CIDR calculator: find the minimum CIDR which contains multiple ip addresses | |
# | |
# Example: | |
# $ cidr 142.250.66.78 142.250.204.142 142.251.130.14 | |
# 142.250.0.0/15 | |
# | |
import os |
#!/bin/bash | |
yq -o json | jq -r ' | |
.proxies[] | | |
if .type == "ss" then | |
(["ss://", ("\(.cipher):\(.password)"|@base64), "@\(.server):\(.port)"] | join("")) | |
elif .type == "vmess" then | |
({v:"2", ps:.name, add:.server, port:.port, id:.uuid, aid:.alterId, scy:.cipher, net:.network, host:.["ws-opts"].headers.Host, path:.["ws-opts"].path, tls:(if .tls then "tls" else "" end)} | "vmess://\(.|@json|@base64)") | |
elif .type == "trojan" then | |
("trojan://\(.password)@\(.server):\(.port)?sni=\(.sni)&allowInsecure=1" + (if .network == "ws" then "&type=\(.network)&path=\(.["ws-opts"].path)" else "" end)) |
#!/bin/bash | |
set -uo pipefail | |
CURSOR=${1:-1} | |
API_URL=https://lexica.art/api/infinite-prompts | |
#HTTP_PROXY=172.16.1.48:3128 | |
OUTPUT_DIR=output | |
PAGE_NUM=0 | |
MAX_PAGE_NUM=$((10**6)) |
#!/bin/bash | |
set -uo pipefail | |
URI=${1:?uri is empty} | |
LISTEN_ADDR=127.0.0.1 | |
LISTEN_PORT=1080 | |
CFG_FILE=/tmp/v2ray.json | |
PID_FILE=/tmp/v2ray.pid |