Skip to content

Instantly share code, notes, and snippets.

View UncleBrook's full-sized avatar
🎯
Focusing

UncleBrook UncleBrook

🎯
Focusing
  • Sunmi
  • Shang Hai
View GitHub Profile
@UncleBrook
UncleBrook / me.sh
Created June 6, 2024 03:39
Android: Fix adb devices no permissions
add_udev_rule() {
local rules_file=/etc/udev/rules.d/51-android.rules
local idVendor
local idProduct
# 根据参数数量分别处理
case "$#" in
1) # 一个参数,应该是 idVendor:idProduct
if [[ "$1" =~ ^([0-9a-fA-F]{4}):([0-9a-fA-F]{4})$ ]]; then
@UncleBrook
UncleBrook / Change window WM_CLASS
Last active January 4, 2024 07:32
Linux GUI: Change window WM_CLASS
# Change window WM_CLASS
cwwc() {
xprop -id $(xwininfo -int | grep -oP '(?<=Window id: )\d+') -f WM_CLASS 8s -set WM_CLASS "$1"
}
@UncleBrook
UncleBrook / For Mac 4.2.6 unlimited trial.md
Last active February 28, 2022 08:01 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher,4.2.5,4.2.6,4.3.7,it's works , this is the way which makes Always in evaluation mode 。

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@