Arch 安装及初始化配
调整控制台字体(可选) 终端字体以大号字体显示 setfont ter-132n 无线连接 iwd: iNet wireless daemon iwctl device list # <name> 为 device list 打印列表你中的名字,如 `station wlan0 scan` station <name> scan station <name> get-networks # <ssid> 为 wifi名称 station…
Read more ⟶
macOS 清除 Launchpad 中的无用图标
首先备份找到的数据库文件, 然后再操作 有些已经卸载的application在MAC launchpad (苹果启动台)无法删除: 方法一:Terminal删除 通过命…
Read more ⟶
如何升级Golang依赖项
无论您是否使用Go modules,通过使用go get 命令升级Go 依赖项都是一项基本的工作。 下面是几个如何升级Go modules的示例。 如何将依赖…
Read more ⟶
FIX - gpg failed to sign the data fatal: failed to write commit object
For MacOS | Mojave | High Sierra | BigSur | Monterey
Step 1 - Upgrade current gpg brew upgrade gnupg Step 2 - Install pinentry-mac brew install pinentry-mac Step 3 - Update gpg-agent.conf echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf Step 4 - Restart gpg-agent killall gpg-agent && gpg-agent --daemon Step 5 - Configure git to use GPG git config --global gpg.program gpg git config --global commit.gpgsign true …
Read more ⟶
golang中var、make、new的使用[转]
一、var、make、new、:=的使用习惯: 1.使用make(),来初始化slice,map 和channel 。 2.大多数场合,类型明确的场…
Read more ⟶
Uninstall nix on MacOS
要在 Mac OS 上卸载 nix,请完成以下步骤:: Step 1: 编辑 /etc/zshrc 和/etc/bashrc 并删除以下行 sourcing nix-daemon.sh #Nix if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' fi # End Nix 如果 zshrc 和 bashrc 这两个文件在安…
Read more ⟶
How to look at the stack with gdb
I was chatting with someone yesterday and they mentioned that they don’t really understand exactly how the stack works or how to look at it.
So here’s a quick walkthrough of how you can use gdb to look at the stack of a C program. I think this would be similar for a Rust program, but I’m going to use C because I find it a little simpler for a toy example and also you can do Terrible Things in C more easily.…
Read more ⟶
Building cgit on macOS
Checkout and init the submodule.
git clone git://git.zx2c4.com/cgit cd cgit git submodule init git submodule update Install gettext through brew.
brew install gettext
Then create a cgit.conf file and set complier/linker flags to use the gettext library installed before.
CFLAGS = -g -O2 -Wall -I/usr/local/opt/gettext/include LDFLAGS = -L/usr/local/opt/gettext/lib Finish up with a simple make command.
make…
Read more ⟶
Vim Cheat Sheet
A Great Vim Cheat Sheet Essentials Cursor movement (Normal/Visual Mode) h j k l - Arrow keys w / b - Next/previous word W / B - Next/previous word (space seperated) e / ge - Next/previous end of word 0 / $ - Start/End of line ^ - First non-blank character of line (same as 0w) Editing text i / a - Start insert mode at/after cursor I / A - Start insert mode at the beginning/end of the line o / O - Add blank line below/above current line Esc or Ctrl+[ - Exit insert mode d - Delete dd - Delete line c - Delete, then start insert mode cc - Delete line, then start insert mode Operators Operators also work in Visual Mode…
Read more ⟶
去掉doc88,360doc,csdn和sfgg的登陆后复制限制
各大站都搞这个登陆复制,真的恶心, 尤其是csdn,各种和谐, 虽然有命令,但是每次敲都贼麻烦, 来个油猴脚本吧~~ /* eslint-disable no-undef */ /* eslint-disable no-eval */ // ==UserScript== // @name 去掉d…
Read more ⟶