欢迎来到 nivrrex 的 blog 空间,本 blog 将记录我在 GitHub 和生活中的点点滴滴。
AI programming
AI 编程 现在的 AI 确实挺厉害的,感觉已经很实用了。 最近我有几个需求,比如: 自动处理 PPT 中图片的压缩问题 投影 PPT 时,拍照得到的图片不规则,想自动处理成标准的四边形 ...
use mupdf to read epub and use css set epub font
缘来 最近用手机太多,眼睛不舒服,于是拿起前期买的墨水屏阅读器,准备用起来,先是来看下小说,看看习惯后再过度到其它书籍,期间使用情况记录一下。 获取电子书 目前电子书主要是 txt 、mobi 、epub 等格式的。txt没有格式,看起来不是那么舒服,所以下载后会转成其它格式使用。mobi 是私有格式,而亚马逊已经在2023年6月30日停止Kindle电子书店的运营了,在试用部分软件过程中,发现个别打开 mobi 的会出现卡顿,所以尽量不考虑,只有 mobi 格式的也尽量转换成其它格式使用。 ...
use Windows API to set IE proxy
使用 Windows API 设置 IE 代理服务器 缘 最近折腾各种代理框架,需要设置 IE 代理服务器。了解有两种方式,注册表和API方式。 注册表方式使用时,偶尔会出现设置异常,无法成功的情况,所以想实验一下API的方式。 ...
2022 summary
平淡的一年 GFW 这一年里, 买了几家新的 VPS ,试用了后,或多或少有点问题,决定明年就续约那两家固定的。科学上网技术也实验了几个新的 hysteria / tuic / gost / glider / mieru / pingtunnel ,目前稳定的在使用 naiveproxy。速度不重要,稳定才重要。 ...
2021 summary
折腾的一年,回归平淡 GFW 这一年里, VPS 换了好几家,科学上网技术也换了好几种:ss / ss+kcptun+udp2raw / trojan / xray(vless) / naiveproxy / hysteria , bbr 核心也反复调整。 后来,是因为运营商的网络调整,国外 ip 连接不再丢包了,便随意选择了一种,用了下去。线路质量远比技术方案选择重要的多。 ...
dlang with ldc in mipsel
简介 突然想用dlang语言玩玩,然后又希望能在路由器上使用(openwrt mipsel),就实验了一下Cross-compiling with LDC,现在将具体过程记录一下。 mipsel gcc 首先需要到openwrt下载路由器对应的gcc的Cross-Compiler,我用的是mt7621的路由器,并将其下载到了 /root/mipsel/ 目录下 ...
compile nim with tcc
缘来 Nim语言可以转换成C、C++、Objective-C、JavaScript等语言,其中C语言默认是转换成GCC进行编译的,相较于Go语言来说,编译速度还是有点慢的。于是兴起了用Tcc编译器编译Nim语言的想法。 ...
crosscompiling for openwrt with golang
缘来 实验了下nim语言(nimlang)在OpenWRT系统下可执行程序的交叉编译,也想实验一下Golang的交叉编译,发现更方便。 Golang支持的交叉编译平台 amd64 (also known as x86-64) A mature implementation. 386 (x86 or x86-32) Comparable to the amd64 port. arm (ARM) Supports Linux, FreeBSD, NetBSD, OpenBSD and Darwin binaries. Less widely used than the other ports. arm64 (AArch64) Supports Linux and Darwin binaries. New in 1.5 and not as well exercised as other ports. ppc64, ppc64le (64-bit PowerPC big- and little-endian) Supports Linux binaries. New in 1.5 and not as well exercised as other ports. mips, mipsle (32-bit MIPS big- and little-endian) Supports Linux binaries. New in 1.8 and not as well exercised as other ports. mips64, mips64le (64-bit MIPS big- and little-endian) Supports Linux binaries. New in 1.6 and not as well exercised as other ports. s390x (IBM System z) Supports Linux binaries. New in 1.7 and not as well exercised as other ports. wasm (WebAssembly) Targets the WebAssembly platform. New in 1.11 and not as well exercised as other ports. Golang针对mips系统的交叉编译 GOOS=linux GOARCH=mips go build -ldflags="-s -w" test.go 直接指定目标系统和CPU架构,就直接可以编译生成对应平台下的可执行文件 ...
crosscompiling for openwrt with nim
缘来 nim语言(nimlang)最近更新到1.02版本了,感觉还不错,正好最近在玩OpenWRT,记录一下在Linux下交叉编译mips架构的OpenWRT系统下的可执行程序步骤。 Debian系统下下载nim语言 sh -c 'printf "deb http://ftp.cn.debian.org/debian/ sid main" > /etc/apt/sources.list.d/sid.list' apt update apt -t sid install nim -y Debian系统下安装gcc等编译环境 apt-get install build-essential 下载对应架构的OpenWRT编译工具链toolchain wget https://archive.openwrt.org/releases/18.06.4/targets/ramips/mt7621/openwrt-sdk-18.06.4-ramips-mt7621_gcc-7.3.0_musl.Linux-x86_64.tar.xz tar xvf openwrt-sdk-18.06.4-ramips-mt7621_gcc-7.3.0_musl.Linux-x86_64.tar.xz rm openwrt-sdk-18.06.4-ramips-mt7621_gcc-7.3.0_musl.Linux-x86_64.tar.xz 设置环境并进行编译 export PATH=/root/openwrt-sdk-18.06.4-ramips-mt7621_gcc-7.3.0_musl.Linux-x86_64/staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin/:$PATH nim -d:release --opt=size -d:ssl --cpu:mipsel --os:linux --gcc.exe:mipsel-openwrt-linux-gcc --gcc.linkerexe:mipsel-openwrt-linux-gcc c test.nim 结 就这样,就可以生成对应路由器下的可执行文件啦~
ubnt er-x use openwrt
给UBNT的ER-X刷OpenWrt固件 缘 UBNT 的 ER-X 是个弱电箱的神器,设备很小,用的是 MT7621AT 。虽然没有无线,但是弱电箱里面无线信号本来就屏蔽的厉害,后期加装个 AP 就行了。 ...