Skip to content

Instantly share code, notes, and snippets.

View RigoLigoRLC's full-sized avatar
😉
Working on something big

Wu Haotian RigoLigoRLC

😉
Working on something big
View GitHub Profile
@RigoLigoRLC
RigoLigoRLC / gist:a8bbb01d6254c739a18a5cd898af5e05
Created January 18, 2025 15:49
New programming language idea: REvamped SHell, resh. Enjoy the best of both shell script and high level programming languages.
#!/bin/resh
# This is a Unix shell, what's fun about it?
HELLO='Hello,'
CURRENT_VERSION=4
# But here's a twist
# I know you hate C++ style lambda capture
resh [&] {
// But now you code in a high level scripting language
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ŀ
▒ Boot Menu List ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Ĵ
▒ -> 1 'LoongOS (2k300)' ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
▒ ▒
@RigoLigoRLC
RigoLigoRLC / DefaultKeyBinding.dict
Created December 1, 2024 05:43
Home/End key on regular keyboard fix for macOS. Tested on macOS 15.1.
<!--SPDX License Identifier: CC0-1.0-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key></key>
<string>moveToBeginningOfParagraph:</string>
<key>$</key>
<string>moveToBeginningOfParagraphAndModifySelection:</string>
<key>^</key>
@RigoLigoRLC
RigoLigoRLC / FutureComposer1.4.hexpat
Created April 24, 2024 04:21
Future Composer 1.4 module file format description
#include <std/core.pat>
struct fc_pattern_index_entry_channel {
u8 pattern_id;
u8 transpose;
u8 sound_transpose;
};
struct fc_pattern_index_entry {
@RigoLigoRLC
RigoLigoRLC / template.svg
Created April 13, 2024 07:33
红色电音极地大冲击模板 (CC BY-NC 4.0)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RigoLigoRLC
RigoLigoRLC / svr1_lua.hexpat
Created January 27, 2024 03:49
Synthesizer V R1 - Lua Bytecode Hexpat
struct header {
u8 initial, format, version;
u8 literal[6];
u32 intdata;
float floatdata;
u8 lintsize, insnsize, numbersize, intsize,
ptrsize;
};
struct undump {
@RigoLigoRLC
RigoLigoRLC / pd.py
Created January 12, 2024 16:30
CAN_H Decode for libsigrokdecode for DSView(v1.3.1) for DSLogic
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012-2013 Uwe Hermann <[email protected]>
## Copyright (C) 2019 Stephan Thiele <[email protected]>
## Copyright (C) 2023 DreamSourceLab <[email protected]>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
@RigoLigoRLC
RigoLigoRLC / jlu_cas.kt
Created October 16, 2023 03:36
JLU CAS Login snippet (Does Not Work)
// Build an client that doesn't follow redirect
val okhttpNoRedirect = okhttp.newBuilder()
.followRedirects(false)
.build()
if (!verifyUserCredentials()) {
state._loginState.value = LoginState.NoSessionData
return
}
state._loginState.value = LoginState.LoggingIn
Update note: Linux kernel commit feb627e8d6f69c9a319fe279710959efb3eba873
breaks this patch and will need to be reverted in order for this to work on
kernels starting with 5.16.
From 28e67537895c4b46b9721f19609ee4f2ccb8c132 Mon Sep 17 00:00:00 2001
From: pi <[email protected]>
Date: Sat, 7 Nov 2020 18:41:42 +0100
Subject: [PATCH] Add 'hide-hypervisor' QMP command
CAUTION: Extremely hacky stuff below. Use at own risk of bugs, breakage and
@RigoLigoRLC
RigoLigoRLC / chkwntrm.c
Created November 26, 2021 15:06
Check if a CLI program is running inside Windows Terminal
#include <psapi.h>
#include <windows.h>
#ifdef _WIN32
int checkIsWinTerm()
{
HWND hConsoleWnd = GetConsoleWindow();
DWORD dwConsolePid;
GetWindowThreadProcessId(hConsoleWnd, &dwConsolePid);