1. Yubikey 使用

    SSH

    Export the SSH public given a PGP authenticate key:

    gpg --armor --export-ssh-key $akey_id > id_rsa.pub
    

    References

    Some blogs written in Chinese:

    • https://blog.gimo.me/posts/getting-started-with-yubikey/
    • https://haoyu.love/blog523.html
    • https://haoyu.love/blog896.html
    • https://blog.starryvoid.com/archives/411.html
    • https://www.yubico.com/works-with-yubikey …
    read more
  1. Debian Development

    This page records my daily commands used in packaging, building and maintaining a Debian package.

    Basic workflow

    If you want to update a package with a new upstream release:

    gbp clone ...
    gbp import-orig $UPSTREAM_TAR_URL
    gbp export-orig  # if no .tar file
    dh_make -i -p package_version -c custom --copyrightfile ../LICENSE.md
    # Build …
    read more
  1. PGP 密钥常用命令记录

    本文记录了在使用 gpg 管理 PGP 密钥时的一些常用命令.

    查看本地公钥:

    gpg -k --keyid-format long
    

    验证私钥密码:

    gpg --export-secret-keys -a $your_key_id > /dev/null && echo OK
    gpg --dry-run --passwd $your_key_id …
    read more
  1. rg Manual

    ripgrep Rust version grep, here records some common used options for it.

    rg "xxx" -g "file_pattern.txt" -g "!*.out"
    
    • -i: ignore case
    • -s: case sensitive

    Patterns

    • !*.txt: exclude *.txt
    • ^.*fast.*$: ^ line head, $ line tail
    read more
  1. Podsync 设置记录

    Podsync 是什么?

    经常看 Youtube 的人应该知道, 上面有不少节目的形式都是主持人对着镜头发言, 视频部分并没有太多值得关注的内 …

    read more
  1. Git useful commands

    Delete submodule

    ref: https://gist.github.com/myusuf3/7f645819ded92bda6677?permalink_comment_id=3915500#gistcomment-3915500

    # Remove the submodule entry from .git/config
    git submodule deinit -f path/to/submodule
    
    # Remove the submodule directory from the superproject's .git/modules directory
    rm -rf .git/modules/path/to/submodule
    
    # Remove the entry in .gitmodules and …
    read more
  1. 常用的 nvidia-smi 命令

    查询

    频率相关:

    • nvidia-smi --query-gpu "clocks.sm,clocks.mem" -i 0 --format=csv
    • nvidia-smi --query-gpu "clocks.max.sm,clocks.max.mem" -i 0 --format=csv

    设置

    分别设定 GPU 运行频率和功耗上限:

    • nvidia-smi -i 0 -lgc xxx
    • nvidia-smi …
    read more
  1. 软路由配置

    今天花了一个早上的时间利用之前捡的 J4125 工控机配合一个硬路由 (作为无线 AP 和交换机) 在实验室搭建了一个简单的 AIO …

    read more
  1. `wget` 和 `curl` 常用选项

    记录下 wgetcurl 这两款工具的常用选项.

    其中 wget 主要用于下载文件, 而 curl 则用于发送请求.

    wget

    输入 wget --help 可查看:

    • -o 指定日志输 …
    read more
  1. 将 curl 交叉编译到 OpenWrt 上

    背景

    实验室使用网络需使用个人账号密码在特定网页上进行验证, 在 OpenWrt 上可以使用 curl 进行验证. 但使用 opkg install curl 安装的 curl …

    read more

links