Skip to content

Instantly share code, notes, and snippets.

@ykai55
ykai55 / mteam.user.js
Last active August 24, 2025 14:25
显示MTeam-余额(分享率大于3)
// ==UserScript==
// @name M-Team 余额
// @namespace http://tampermonkey.net/
// @version 2024-02-25
// @description try to take over the world!
// @author You
// @match https://kp.m-team.cc/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=m-team.cc
// @grant none
// ==/UserScript==
@ykai55
ykai55 / pb_reader.ts
Created December 3, 2024 03:11
PB reader
export enum PBType {
bool = 0,
bytes = 1,
double = 2,
float = 3,
int32 = 4,
int64 = 5,
string = 6,
uint32 = 7,
uint64 = 8,
@ykai55
ykai55 / apply_env.fish
Last active September 4, 2025 04:17
fish shell function to apply environment variables from a bash/sh script
# fish shell function to apply environment variables from a bash/sh script
function apply_env --description "source a .sh script and apply its env changes to the current fish shell"
argparse 'v/verbose' -- $argv
or return
# Check for input file
if test -z "$argv[1]"
echo "Usage: apply_env <path_to_script.sh>"
return 1
end