Skip to content

Instantly share code, notes, and snippets.

View finpluto's full-sized avatar
🦀
Panicking

Finpluto finpluto

🦀
Panicking
  • Individual
  • Proxima Centauri
View GitHub Profile
@maokwen
maokwen / AutoHotKey-Lock-Chinese-IME.ahk
Last active March 29, 2025 15:36
AutoHotKey 锁定微软拼音中英文切换
#Include %A_ScriptDir%
timeInterval := 500
; +-------------------------+-------------------------+
; | SubLanguage ID | Primary Language ID |
; +-------------------------+-------------------------+
; 15 10 9 0 bit
InChs() {
@udf
udf / write_up.md
Last active January 30, 2026 15:21
A Trick To Use mkMerge at The Top Level of a NixOS module

The Setup

I wanted to write a module that generates multiple systemd services and timers to scrub some zfs pools at certain intervals. The default scrub config does not support individual scrub intervals for each pool.

I want the config to look like this:

{
  services.zfs-auto-scrub = {
 tank = "Sat *-*-* 00:00:00";
@Sucareto
Sucareto / Asp2Core.py
Last active March 3, 2025 00:49
Asphyxia转Asphyxia Core的数据转换工具
from random import sample, randint
from string import ascii_letters, digits
import json
from re import search
from time import time
import shutil
from colorama import init
init(autoreset=True)
# 全局变量
appealID = 0
@codehz
codehz / iprule.sh
Last active January 6, 2025 13:09
nftables for redir proxy
ip rule add fwmark 0x233 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100
@LeadroyaL
LeadroyaL / Entry.java
Created May 10, 2020 13:25
使用xposed跳过小米USB安装应用确认
package com.leadroyal.miuiusb;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;
@Greelan
Greelan / letsencrypt_notes.sh
Last active November 1, 2025 14:45 — forked from lachesis/letsencrypt_notes.sh
Set up Let’s Encrypt certificate using acme.sh as non-root user
# How to use acme.sh to set up Let's Encrypt, with the script being run
# mostly without root permissions
# See https://github.com/Neilpang/acme.sh for more
# These instructions use the domain "EXAMPLE.COM" as an example
# These instructions:
# - work on Ubuntu 18.04 and 20.04 with nginx
# - use CloudFlare DNS validation
@bbqtd
bbqtd / macos-tmux-256color.md
Last active February 9, 2026 03:28
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

@Matthias247
Matthias247 / async_await_interfaces.md
Last active April 5, 2023 18:08
# Async/Await - The challenges besides syntax

Async/Await - The challenges besides syntax

4 years after after the release of Rust 1.0, it seems like Rust is now finally getting close to getting support for async/await - a language feature which aims to make it easier to write programs in an asynchronous fashion (where multiple logical tasks get multiplexed on a lower number of OS threads).

One of the last steps before the feature is stabilized is choosing the best possible syntax. The discussions around syntax have triggered an enormous

@elizarov
elizarov / Delimited.kt
Last active October 27, 2024 23:38
Delimited Continuations shift/reset in Kotlin
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
/**
* Implementation for Delimited Continuations `shift`/`reset` primitives via Kotlin Coroutines.
* See [https://en.wikipedia.org/wiki/Delimited_continuation].
*
* The following LISP code:
*
* ```
@yougg
yougg / proxy.md
Last active January 18, 2026 10:28
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)