Skip to content

Instantly share code, notes, and snippets.

View Ethkuil's full-sized avatar

Hobart Zhi-xin Lin Ethkuil

View GitHub Profile
/*
* float_i2f - Return bit-level equivalent of expression (float) x
* Result is returned as unsigned int, but
* it is to be interpreted as the bit-level representation of a
* single-precision floating point values.
* Legal ops: Any integer/unsigned operations incl. ||, &&. also if, while
* Max ops: 30
* Rating: 4
*/
unsigned float_i2f(int x) {
@Ethkuil
Ethkuil / shortcuts.aardio
Last active August 30, 2024 15:37
Shortcuts
// 似乎还是 AHK 比较合适
// TODO 0: rewrite it with AHK
// TODO 1: add more features I'd planned
// aardio is based on Lua. So the scope is global.
(function() {
count = 0
// count 为 0 等效于 count 为 1
runWithCount = function(f) {
do {
@Ethkuil
Ethkuil / bug_report.yaml
Created February 24, 2023 07:14
Issue模板片段,提醒无脑回复 Issue 的人
- type: textarea
id: kind_reminder
attributes:
label: 致遇到了相同问题准备回复的人
description: 请勿修改文本框中的内容
value: |
**致遇到了相同问题准备回复的人**
**太长不看**:
1、遇到了相同的问题:**请用左下角的 reaction 点赞**
2、实时关注该 Issue 的后续进展:**请用 Issue 页上的 Subscribe 功能**(在 PC 端按钮通常位于页面右侧)。
@Ethkuil
Ethkuil / v.bat
Last active November 18, 2023 10:28
Quickly start coding snippet in vscode
@echo off
set dir=%TMP%\vscode-tmp-code
for %%i in (rm del cl) do (
if "%1" == "%%i" call :rmTmp && exit
)
if not exist "%dir%" mkdir "%dir%"
set ext=%1
set file=tmp.%ext%
start code %dir% && code %dir%\%file% && exit