使用Openwrt作为主路由,另一台Ubuntu 18.04主机上使用Docker运行Clash来作为网关进行转发,以达到按规则智能翻墙的目的。也是很多人提到的“旁路由”方法。
注:Openwrt可以直接编译OpenClash,我这次只是纯粹为了折腾而折腾。
// 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. |
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', |
#!/usr/bin/env bash | |
ENV_PATH="$(dirname "$(dirname "$(which pip)")")" | |
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)" | |
BAD_ENV_PATHS="/usr/local" | |
echo "Ensure the root of the broken virtualenv:" | |
echo " $ENV_PATH" |
It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.
Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)
Edit version.cfg
in the conf
folder, and change ClientVersion
and ServerVersion
to the version you want (for instance, 1.12.2).
Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip
(for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip
(for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)
Extract that zip into the MCP conf
folder, over
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
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: |
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
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 (/).