Skip to content

Instantly share code, notes, and snippets.

/*───────────────────────────────────────────────────────────────
Retro‑Dark Markdown • Functional Rebuild
– CRT vibe (black + neon green)
– Correct ordered‑list numbering
– Code‑block language labels, no extra gutter
────────────────────────────────────────────────────────────────*/
/* 0. Tokens & font */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');
:root{
const WIFI_DONT_NEED_PROXYS = ['178-5', 'G24', 'G242.4', 'cellular', '12'];
const CURRENT_WIFI_SSID_KEY = 'current_wifi_ssid';
if (wifiChanged()) {
const currentNetwork = $network.wifi.ssid || 'cellular';
const mode = WIFI_DONT_NEED_PROXYS.includes(currentNetwork)
? 'direct'
: 'rule';
$surge.setOutboundMode(mode);
$notification.post(
#!name=YLGY
#!desc=Perform MitM on all hostnames with port 443, except those to Apple and other common sites which can't be inspected. You still need to configure a CA certificate and enable the main switch of MitM.
[MITM]
hostname = *.easygame2021.*
[URL Rewrite]
^https:\/\/cat-match.easygame2021.com\/sheep\/v1\/game\/map_info_new\?map_id=9\d+ https://cat-match.easygame2021.com/sheep/v1/game/map_info_new?map_id=80001 302
@gyh1621
gyh1621 / 1.js
Created September 16, 2022 17:45
var body = $response.body
var url = $request.url
if (body) {
var obj = JSON.parse($response.body)
console.log(obj.data)
obj.data.map_data =
'{"widthNum":8,"heightNum":10,"levelKey":80001,"blockTypeData":{"1":2,"4":1,"13":2},"levelData":{"1":[{"id":"1-16-16","type":0,"rolNum":16,"rowNum":16,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-28-16","type":0,"rolNum":28,"rowNum":16,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-40-16","type":0,"rolNum":40,"rowNum":16,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-16-32","type":0,"rolNum":16,"rowNum":32,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-28-32","type":0,"rolNum":28,"rowNum":32,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-40-32","type":0,"rolNum":40,"rowNum":32,"layerNum":1,"moldType":1,"blockNode":null},{"id":"1-16-48","type":0,"rolNum":16,"rowNum":48,"layerNum":1,"moldType":2,"blockNode":null},{"id":"1-28-48","type":0,"rolNum":28,"rowNum":48,"layerNum":1,"moldType":2,"blockNode":null},{"id":"1-40-48","type":0,"r
FROM caddy:builder AS builder
RUN caddy-builder \
github.com/caddy-dns/cloudflare
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
#!/usr/bin/python3
#coding: utf-8
import os
from guessit import guessit
def rename_subs(videos, sub_dir='./', stypes=['.ass', '.srt', '.ssa']):
for file in os.listdir():
sname, stype = os.path.splitext(file)
if stype not in stypes: continue
sinfo = guessit(file)
@gyh1621
gyh1621 / doom.txt
Created June 10, 2020 00:34 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@gyh1621
gyh1621 / YoutubeAd.list
Last active June 7, 2020 08:14
YoutubeAd.list
########################################
# List Of Domains To Block YouTube Ads #
# *** Under Testing ***
########################################
# FROM https://github.com/root-host/YouTube-Adblock
# Wildcard blocking
# The domains below need to beed added to your program as wildcard domains
# ( without the # )
GIT_USERNAME=""
GIT_EMAIL=""
if [ "$(id -u)" == "0" ]; then
apt update && apt install -y sudo
fi
sudo apt update
sudo apt install -y curl