Skip to content

Instantly share code, notes, and snippets.

View ayanamist's full-sized avatar

ayanamist ayanamist

View GitHub Profile
@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 / miui_system_apps_url.md
Last active February 8, 2024 14:27
MIUI系统应用在应用商店的url

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

@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
@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 / 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 / throttle.js
Created December 29, 2014 05:54
throttle function for node.js
/**
* 限制fn同时执行的个数,fn必须符合node函数规范,即参数最后一位是回调函数
* 如果有this绑定需求,需要提前bind好,否则this会变null。
*
* @param fn
* @param concurrency
* @returns {Function}
*/
function throttle(fn, concurrency) {
if (concurrency <= 0) {
@ayanamist
ayanamist / build-ffmpeg.sh
Last active April 3, 2016 13:46
Build libffmpeg.so for DicePlayer
#!/bin/bash
NDKROOT=~/android-ndk # insert android ndk path
DEVICE_TYPE="arm_neon" # insert device type(arm_neon, arm_tegra2, x86)
OS=LINUX64 # insert OS Version(LINUX64, LINUX32, WINDOWS_64, WINDOWS)
if [ $DEVICE_TYPE == "arm_neon" ];
then
TOOLCHAIN=toolchain-arm
ARCH=arm
@ayanamist
ayanamist / config.json
Last active January 6, 2017 22:58
Proxy Pac Server
{
"local": "127.0.0.1:8124",
"remote": [
{
"proxy": "direct",
"rules": [
["10.0.0.0", "255.0.0.0"],
["100.64.0.0", "255.192.0.0"],
["127.0.0.0", "255.0.0.0"],
["172.16.0.0", "255.240.0.0"],