Skip to content

Instantly share code, notes, and snippets.

View xfl03's full-sized avatar
💭
I may be slow to respond.

33 xfl03

💭
I may be slow to respond.
View GitHub Profile
@dnaroma
dnaroma / binary.py
Last active April 19, 2024 13:04
Extract AppHash from unity assets
from io import RawIOBase
from struct import *
from typing import Callable
def offset_decorate(func: Callable) -> Callable:
def func_wrapper(*args, **kwargs) -> Callable:
offset = kwargs.get('offset')
if offset is not None:
@sindresorhus
sindresorhus / esm-package.md
Last active April 23, 2024 09:02
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@abc1763613206
abc1763613206 / bvtest.py
Last active February 23, 2024 22:18
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@davidwu111
davidwu111 / docker_openwrt_config.md
Last active July 1, 2023 08:33
Clash Docker & Openwrt 配置与踩坑记录

Clash Docker & Openwrt 配置与踩坑记录


使用Openwrt作为主路由,另一台Ubuntu 18.04主机上使用Docker运行Clash来作为网关进行转发,以达到按规则智能翻墙的目的。也是很多人提到的“旁路由”方法。

注:Openwrt可以直接编译OpenClash,我这次只是纯粹为了折腾而折腾。


@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active April 13, 2024 09:40
git ssh 代理设置

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@williewillus
williewillus / primer.md
Last active April 22, 2024 15:29
1.13/1.14 update primer

This primer is licensed under CC0, do whatever you want.

BUT do note that this can be updated, so leave a link here so readers can see the updated information themselves.

1.13 and 1.14 are lumped together in this doc, you're on your own if you just want to go to 1.13 and not 1.14, for some reason.

1.15 stuff: https://gist.github.com/williewillus/30d7e3f775fe93c503bddf054ef3f93e

Things in Advance

  • ResourceLocation now throw on non-snake-case names instead of silently lowercasing for you, so you probably should go and change all those string constants now. More precisely, domains must only contain alphanumeric lowercase, underscore (_), dash (-), or dot (.). Paths have the same restrictions, but can also contain forward slashes (/).
@asukakenji
asukakenji / 0-go-os-arch.md
Last active April 21, 2024 11:48
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@lubien
lubien / stickers-downloader.js
Last active November 21, 2023 03:06
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.
@ravibhure
ravibhure / git_rebase.md
Last active April 3, 2024 08:38
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream