Skip to content

Instantly share code, notes, and snippets.

View KnIfER's full-sized avatar

knziha KnIfER

View GitHub Profile
@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 March 22, 2024 01:13
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::
@KnIfER
KnIfER / 单文件保存纯文本网页.user.js
Last active June 27, 2024 03:34
Save web pages into one html file. It keeps original image urls and the result is lightweight, readable and extendable.
// ==UserScript==
// @name SingleFile Pure - Pure html downloader
// @name:zh SingleFile Pure - 保存纯HTML
// @namespace https://gist.github.com/KnIfER
// @version 2.2.x
// @description 将当前网页保存为一个纯文本的.html网页文件,不保存二进制
// @description:en Save webpages into one pure html file, without binary data.
// @author PY-DNG
// @license MIT
// @grant GM_registerMenuCommand
@KnIfER
KnIfER / novel_guard.user.js
Last active April 27, 2023 08:57
novel_guard.user.js
// ==UserScript==
// @name 小说守护神
// @namespace https://gist.github.com/KnIfER
// @description 首次访问小说网站时,自动开启以下两项设置:-- ①禁止跨域跳转 -- ② 自动开启无图模式
// @version 1
// @match *://*/*
// @run-at document-start
// @run-at document-end
// @grant GM_blockImage
// @grant GM_blockCorsJump
@KnIfER
KnIfER / easy_scrollbar.ahk
Created April 12, 2023 10:07
ahk how to make scrollbar drag more easily by middle button down.
#IfWinActive ahk_exe chrome.exe
$MButton::
MouseGetPos, xpos, ypos
WinGetPos,x,y,w,h
if (xpos<w && xpos >= w-30 && ypos>0 && ypos<h) {
global tmp:=1
Send +{LButton down}
}
else MouseClick, M
@KnIfER
KnIfER / JavaTestUtility.java
Created March 4, 2023 05:23
FIX IDEA -- "Focus on Start-up" option doesn't work in Intellij IDEA Ultimate
package hunxiao;
import org.junit.Test;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
// ==UserScript==
// @name B站学习机 | Bilibili+Youtube字幕全文阅读 | coursera-like subtitles fulltext reader
// @namespace https://gist.github.com/KnIfER/9e43ffa31c3b9831a500edf35595c1dc
// @version 4
// @description 在线字幕阅读或下载,B站油管秒变cousera! - Read & learn subtitles full text online!
// @author KnIfER
// @match https://*.bilibili.com/video/*
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @license MIT