duangsuse::Echo
585 subscribers
4.12K photos
118 videos
579 files
6.14K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
Forwarded from dnaugsuz
我举个例子:
# /app-bin-buildtools/gcc/Package.toml
icon = "https://icon.cc/0.png" # String|Nil
name = "gcc" #String|Nil
desc = "The GNU Compiler Collection — C and C++ frontends" #String|Nil
license = "GPLv3"
apimin = 10 #Integer|Nil
authors = [ "😞" ]
deps = [ "binutils", "foodep" ] #Array of String|Nil
optdeps = [ { pkg = "make", why = "for build system" }, { pkg = "git", why = "for VCS" } ]
buildeps = [ "wget" ]#Array of String|Nil
duangsuse::Echo
#linux #hack VSCode Alt-S 同行数多光标可以列粘贴,但在 #telegram desktop 里编辑、导入导出长的富文本,就完蛋了 😅 Bot还被限制了2个链接截断 web.telegram.org 是用 $('[tabindex]:read-write').innerHTML 表示消息的,bot markdown 所支持的格式勉强能F12粘贴 不知为何Qt与Chrome,Wx的剪贴板不兼容 xclip -selection c -o -t TARGETS xclip -selection…
#tool tty canvas #ai 编程失败
>用py实现 sudo hexdump /dev/input/mice -ve'3/1 "%d " "\n"'| for X,Y in lines: 叠加x=0,y=0 并移动终端光标
(很烂而且没有避print换行的坑)
gpmm() { #鼠标光标
stdbuf -o0 hexdump /dev/input/mice -e '3/1 "%d ""\n"'|awk -v kx=$((COLUMNS / LINES)) -e '!/*/{x+=$2/k*kx; y+=$3/k; printf "\x1b[%d;%dH", -y,x} BEGIN{x=y=0; kx*=.5;k=9.3}'; }

>用py struct("bbb") 读取 /dev/input/mice, for btn,X,Y in evt: 叠加x=0,y=0 并将其以 "\x1b[y;xH" 显示
(它没用ANSI escape

#code #bash GPM 字符画板 sudo cat /dev/input/mice | python a.py $COLUMNS $LINES
import sys, numpy as np #array('b', )

P = np.array([0,0]); dk = np.array([.6 ,-.4])
L = np.array(sys.argv[1:]).astype(float)

while True:
btn,*dP = np.frombuffer(sys.stdin.buffer.read(3), np.byte)
P=np.clip(0,(P+dP*dk),L); x,y=P.astype(int)
print('\x1b[',flush=True, end=f'{y};{x}H')