Skip to content

Instantly share code, notes, and snippets.

View tyan-boot's full-sized avatar
🦀
Creating a new world.

Tyan tyan-boot

🦀
Creating a new world.
  • RingNet
  • CN
  • 19:04 (UTC +08:00)
View GitHub Profile
@ZipFile
ZipFile / README.md
Last active December 4, 2025 21:33
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is

@jcmartinezdev
jcmartinezdev / erc20-token-sample.sol
Last active August 15, 2025 17:50
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe
@StevenACoffman
StevenACoffman / Homoglyphs.md
Last active December 11, 2025 13:10
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@strayge
strayge / reverved_ports_hyperv.md
Created October 27, 2019 10:41
windows 10, port reserved for HyperV
@Bert-Proesmans
Bert-Proesmans / qos-all.auto.rsc
Last active March 22, 2025 06:02
Mikrotik Routerboard QOS script
# Creation Date: November 3, 2018
:local Version "2.0"
:local LASTUPDATE "05/10/2019"
# Tested with RouterOS 6.43.4
#
# Mikrotik script to implement QoS on internet connections.
# The script makes use of Address Lists, Firewall rules (Mangle) for connection tagging, and Queue Trees.
# The script will remove applied rules from previous runs before applying.
#

Bootstrapping Rust with xtensa support

Build xtensa llvm from here https://esp32.com/viewtopic.php?t=9226&p=38466

But add the X86 target like so

cmake ../llvm-xtensa -DLLVM_TARGETS_TO_BUILD="Xtensa;X86" -DCMAKE_BUILD_TYPE=Release -G "Ninja"
@Arathi
Arathi / mobile_prefix_rules.md
Last active July 8, 2020 08:13
中国内地移动终端通信号段规则

中国内地移动终端通信号段规则

正则表达式

移动

^((13[5-9]|14[78]|15[012789]|165|17[28]|18[23478]|19[578])\d{8})|((134[0-8]|144[01]|170[356])\d{7})$

联通

@williewillus
williewillus / primer.md
Last active August 24, 2025 17:11
1.13/1.14 update primer

This primer is licensed under your choice of MIT or 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 (/).