Skip to content

Instantly share code, notes, and snippets.

View ayanamist's full-sized avatar

ayanamist ayanamist

View GitHub Profile
@ayanamist
ayanamist / miui_system_apps_url.md
Last active February 8, 2024 14:27
MIUI系统应用在应用商店的url

电脑上打不开,必须要用MIUI系统打开,会跳转到商店对应页面

@ayanamist
ayanamist / TinyHTTPProxy.py
Created November 24, 2011 09:56
Tiny HTTP Proxy
#!/usr/bin/python
__doc__ = """Tiny HTTP Proxy.
This module implements GET, HEAD, POST, PUT and DELETE methods
on BaseHTTPServer, and behaves as an HTTP proxy. The CONNECT
method is also implemented experimentally, but has not been
tested yet.
Any help will be greatly appreciated. SUZUKI Hisao
@ayanamist
ayanamist / shExpMatch.js
Created June 25, 2012 16:11
Better implementation of shExpMatch
function shExpMatch(url, pattern) {
var pCharCode;
var isAggressive = false;
var pIndex;
var urlIndex = 0;
var lastIndex;
var patternLength = pattern.length;
var urlLength = url.length;
for (pIndex = 0; pIndex < patternLength; pIndex += 1) {
pCharCode = pattern.charCodeAt(pIndex); // use charCodeAt for performance, see http://jsperf.com/charat-charcodeat-brackets
@ayanamist
ayanamist / mitm-cache-proxy.go
Last active June 14, 2022 02:44
一个特殊的MITM http proxy,将图片、js、css请求劫持并缓存在本地,后续再访问时直接从本地返回,避免一些垃圾网站打不开的问题
package main
import (
"bytes"
"compress/gzip"
"errors"
"flag"
"io"
"io/ioutil"
"log"
@ayanamist
ayanamist / errors.go
Created May 28, 2022 02:11
Go errors: combine multiple errors into one
package util
import (
"errors"
"strings"
)
type combinedErr struct {
errs []error
}
@ayanamist
ayanamist / magisk.json
Last active February 1, 2022 16:54
Magisk downgrade channel
{
"magisk": {
"version": "23.0",
"versionCode": "23000",
"link": "https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@23.0/app-release.apk",
"note": "https://topjohnwu.github.io/Magisk/releases/23000.md"
},
"stub": {
"versionCode": "21",
"link": "https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@23.0/stub-release.apk"
@ayanamist
ayanamist / proxy.pac
Created November 24, 2011 06:08
My Pac File for Auto Proxy
var PROXY = {
"direct":"DIRECT",
"gfw":"PROXY 127.0.0.1:8123"
};
var DEFAULT = "direct";
var SECTIONS = [
{
"name":"direct",
@ayanamist
ayanamist / xsh6to5.py
Created December 31, 2018 09:15
Convert Xshell 6 *.xsh files to Xshell 5 *.xsh format
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import ConfigParser
import codecs
import sys
import StringIO
def main():
config = ConfigParser.RawConfigParser(allow_no_value=True)
@ayanamist
ayanamist / fcmproxy.go
Last active August 17, 2021 06:16
FCM proxy
package main
import (
"bufio"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
@ayanamist
ayanamist / go.mod
Created April 15, 2021 07:02
Check Chrome Stable Update
module github.com/ayanamist/CheckChrome
require github.com/google/uuid v1.2.0