Skip to content

Instantly share code, notes, and snippets.

View KnIfER's full-sized avatar

knziha KnIfER

View GitHub Profile
@KnIfER
KnIfER / 让Java再次伟大.md
Last active June 29, 2026 07:11
让Java再次伟大

让Java再次伟大,没有人比我更懂得如何打包!(分享一个四两拨千斤的多jar打包exe方式)

Java 确实是内存不高效的。同样的内存,fultter / dart 能够创建流畅的应用,而Java要么卡成ppt,要么疯狂吃内存。

测试一个虚拟机内存回收效率的方法:win下使用 procgov 假装本机只有 100 mb内存,再运行 gui 程序,测试卡不卡。

结果,javafx 卡成 ppt,flutter 写的桌面app却依然流畅,几乎没有卡顿!(例子:dart写的myune_music存在严重的内存泄漏,稍微切歌内存狂飙300mb+,然后限制100mb后仍然流畅,神奇吧!)

这说明 flutter / dart 的虚拟机比 java 更高级。人才不断涌入新的领域,Java8 已经成熟到可以封印起来装裱,成熟到可以使用一万年,新的改进似乎九牛一毛。

@KnIfER
KnIfER / 0_issue.md
Last active April 3, 2026 04:02
vscode-highlight-issue

Add text overlay to simplify code reading in visual studio code

scenario

While coding compute shaders in Godot with lots of vec4[] buffer , because of the maximum channel is 4 , I have to define more and more buffers, like :

layout(set = 0, binding = 3, std430) restrict buffer b_biomes_define { vec4 biomes_define[]; };
layout(set = 0, binding = 4, std430) restrict buffer b_details_define { vec4 details_define[]; };
layout(set = 0, binding = 5, std430) restrict buffer b_flags_int { ivec4 flags_int[]; 
// ……
@KnIfER
KnIfER / Godot_Launcher.ahk
Last active May 28, 2026 10:09
Godot_Launcher.ahk - Godot Automatic version selector
#SingleInstance Off
#NoTrayIcon
; Stores shortcuts to various Godot engines
global godotFolder := "C:\Softwares\GODOTS\"
; Pre-defined priority list (you can customize this order)
global priorityList := ["godot_voxel_4.1_x86_64.exe"
,"Godot_v4.4-stable_mono_win64.exe"
@KnIfER
KnIfER / _windows_fix_app_white_flash.md
Last active March 7, 2026 08:29
windows 解决任意窗口启动闪白(white flash on start)的终极方案

黑暗模式下,最难忍受启动白屏: chrome,edge,vscode,github desktop,这些浏览器/electron应用……

终极方案 : 启动时注入 dll ,劫持 createWindow, 或将窗口隐藏,或将白色设置为透明色,或显示一个黑色半透明遮罩。

Edge

劫持 createWindow,将白色设置为透明色即可。

@KnIfER
KnIfER / doubao_navigator.user.js
Last active November 23, 2025 03:29
豆包专属 Grok 风格右侧消息导航栏
// ==UserScript==
// @name doubao_navigator
// @namespace http://tampermonkey.net/
// @version 1.1
// @author Grok and you
// @match https://www.doubao.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=doubao.com
// @grant unsafeWindow
// ==/UserScript==
@KnIfER
KnIfER / _readme.md
Last active September 8, 2025 07:36
godot editor tool script auto update on tweaking parameter
@KnIfER
KnIfER / -ReadMe.md
Last active July 21, 2024 05:44
抹布翻译
@KnIfER
KnIfER / - GitHubDesktop_custom.md
Last active June 6, 2024 22:20
GitHubDesktop pin repository list

Workaround for Desktop / Allow the repository list to be expanded all the time

How to use :

  • try to alt+click the big button
  • or right/left click on the left edge of maximized window.

It will toggle the pinning state of repository list view.

When the list view is pinned, it's styles are modified to make it non-modal and always visible.

@KnIfER
KnIfER / acc_lite.ahk
Last active September 30, 2025 08:47
Chrome open bookmarked pages in new tab by default. (single left click open new tab in foreground )
global click_state := 0
global leftDwn := 0
GroupAdd, browser_gp, ahk_exe chrome.exe
Acc_Init(Function := "") {
Static h
If Not h
h:=DllCall("LoadLibrary","Str","oleacc","Ptr")
If Function
@KnIfER
KnIfER / EasyOcr.ahk
Created November 6, 2023 04:09
Easily recognize texts on screen, or just copy image area to clipboard. Left-click and drag to execute OCR; Right-click and drag to copy the screenshot; Click = use the last selection box.
#NoEnv
#MaxThreadsPerHotkey 2
#SingleInstance Force
; 安装需求: https://github.com/telppa/PaddleOCR-AutoHotkey
; getSelectionCoords 改自社区脚本。 纯英文可用 Capture2Text
F2::
;^Q::