Skip to content

Instantly share code, notes, and snippets.

@broven
broven / env.md
Created October 31, 2023 02:51
#python,#env

‎‎​

@broven
broven / dotenv.py
Last active October 31, 2023 03:03
#python
‎‎​
@broven
broven / foo.js
Last active October 25, 2023 06:00
esm-in-browser-test
const foo = (a) => a+1;
export default foo;
@broven
broven / tapable.ts
Last active September 15, 2023 03:55
nodejs
for (let key in this.hooks) {
const hook = this.hooks[key as keyof typeof this.hooks];
hook.intercept({
call: (...args) => {
logger.debug(`Start call hook: ${key} ${util.inspect(args)}`)
},
tap(tap: Tap) {
logger.debug(`[hook] executing >>${tap.name}<< hook`)
},
register(tap) {
// ==UserScript==
// @name switch fastSwitchRegion
// @namespace http://tampermonkey.net/
// @version 1.0
// @description switch 快速换区
// @author metajs
// @match https://accounts.nintendo.com/profile/edit
// @icon https://www.google.com/s2/favicons?sz=64&domain=nintendo.com
// @homepageURL https://gist.github.com/broven/8eacdc57f2bbdebb6499351e4c67be9e
// @updateURL https://gist.github.com/broven/8eacdc57f2bbdebb6499351e4c67be9e/raw/NintendoFastSwitch.user.js
@broven
broven / MitM All Hostnames
Last active April 15, 2024 10:33
surge module
#!name=MitM All Hostnames
#!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 = -*.apple.com, -*.icloud.com, -*.mzstatic.com, -*.crashlytics.com, -*.facebook.com, -*.instagram.com, *