背景
自docker hub以及各种源被墙之后, 阿里云的ack服务就拉取不到docker镜像啦, ack服务底层又是使用containerd, 所以手动使用docker 命令拉取镜像也不可以,需要使用 containerd 对应的命令, 比如 crictl.
但是 crictl 不支持 http_proxy, 所以使用 ctr
1 | # 使用代理 |
自docker hub以及各种源被墙之后, 阿里云的ack服务就拉取不到docker镜像啦, ack服务底层又是使用containerd, 所以手动使用docker 命令拉取镜像也不可以,需要使用 containerd 对应的命令, 比如 crictl.
但是 crictl 不支持 http_proxy, 所以使用 ctr
1 | # 使用代理 |
公司有需求, 打印一些小票
1 | SIZE 60 mm,40 mm\r\n |
https://open.jolimark.com/files/tspl.pdf
1 | const usb = require('usb'); |
1 | let device = usb.findByIds(1137, 85) |
On Windows, if you get LIBUSB_ERROR_NOT_SUPPORTED when attempting to open your device, it’s possible your device doesn’t have a WinUSB driver for libusb to use.
You can install one using Zadig or another approach is to use the UsbDK Backend of libusb by immediately calling usb.useUsbDkBackend().
Note that you cannot use multiple drivers on Windows as they get exclusive access to the device. So if you want to switch between drivers (e.g. using a printer with this software or the system), you will need to uninstall/install drivers as required.
For further info, check How to use libusb on Windows in the libusb’s wiki.
刷后的效果
1 | const usb = require('usb'); |
初心是买一个软路由的硬件设备, 最终选了 r2s, r2s内置的是Openwrt 的系统,但是有些预装软件不全面, 就自己刷了系统, 不小心刷盘的时候把树莓派的移动硬盘刷掉了 /(ㄒoㄒ)/~~, 最终只能重新搭建博客啦~
之前的博客是ghost, 类似于wordpress, 好处是有一个online的后台管理, 可以方便的记录博客。
hexo 的文件可以存在在git中, 就是写作方式没有那么随意了,图片的防止也没有那么方便, 但是苛刻的书写环境,也能让内心更加平静, 也算是一种不错的体验。
1 | pi@amanospi:/etc/init.d $ cat startblob.sh |