Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

240 total results found

TCP Conn Test

Linux Tricks

code-praefect-86dc6b4f4f-ns6dj:~/code/code-gitaly# nc -zv code-gitaly-0-0 9999 code-gitaly-0-0 (10.1.244.170:9999) open nc -zv code-gitaly-0-0 9999 用的是 nc(即 netcat)命令,常用于端口探测或测试连接,参数含义如下: z:只扫描端口,不发送数据("zero-I/O mode")。 v:verbose,显示详细输出。 code-gitaly-0-0:目标主...

nc
tcp
tricks
linux
operating-system

TCP/IP Pseudo Files in Bash

Linux Tricks

TCP/IP pseudo-files are a special feature in Bash that allow you to open network connections using file-like syntax. They're not real files in the /dev directory — rather, Bash internally interprets paths like /dev/tcp/host/port and /dev/udp/host/port to creat...

tricks
pseudo
tcp
networking
linux
operating-system

VIM

Linux Tricks

Paste Mode :set paste Space Tab set tabstop=4 " 设置 tab 键为 4 个空格 set shiftwidth=4 " 设置自动缩进的空格数 set expandtab " 将 tab 转换为空格 Kubectl Editor export EDITOR=/usr/bin/vim

vim
linux
operating-system

Inodes Are Exhausted

Linux Troubleshooting

Errors Tabcannot create temp file for here-document: No space left on device docker exec -it f1ad998136ed /bin/bashfailed to create runc console socket: mkdir /tmp/pty359234715: no space left on device: unknown Solutions rm -rf /tmp/*

troubleshooting
inode
linux
operating-system

Memory Pagesize

Linux Troubleshooting

某些 ARM 机器的内存分页为 64K,会导致 C 语言编写的程序无法运行,因为一般编译的时候宿主机器的分页为 4K,可以使用下面的命令查看。 getconf PAGESIZE macOS 也是 4K

linux
operating-system
process
troubleshooting
pagesize
memory

NAT loopback

Linux Troubleshooting

AWS NLB Troubleshooting Connections time out for requests from a target to its load balancer. Check whether client IP preservation is enabled on your target group. NAT loopback, also known as hairpinning, is not supported when client IP preservation is enabled...

troubleshooting
nlb
loopback
nat
linux
operating-system

NFS Mount Failed

Linux Troubleshooting

背景 香蕉集群的 PV 持载 NFS 192.168.80.50 失败,报错。 Mounting arguments: -t nfs 192.168.80.50:/scan-download-custom-data-pvc /var/lib/kubelet/pods/45c7c6e4-d9de-4c3c-8e6e-41cc1d7ed036/volumes/kubernetes.io~nfs/pvc-minsheng-bank-scan-download-custom-data Output: mount: wro...

troubleshooting
volume
nfs
linux
operating-system

Brew Link

macOS

Switch Version brew unlink go brew link --overwrite go@1.20 --force

brew
homebrew
macos
operating-system

Cursor Settings

macOS

Export Cursor Settings old machine: cmd+shift+p > export profile new machine: cmd+shift+p > import profile { "window.commandCenter": 1, "workbench.colorTheme": "Monokai Pro (Filter Spectrum)", "explorer.autoReveal": false, "editor.fontSize": ...

cursor
macos
operating-system

Env Setup

macOS

XCode Develop Tool 输入 git 会弹出软件安装 git Oh My Zsh Homebrew Jetbrains Mono Nerd Font brew install --cask font-jetbrains-mono-nerd-font Alacritty Font Issue defaults write -g AppleFontSmoothing -int 0 Software brew install zsh-autosuggestions brew in...

setup
macos
operating-system

Finder Sucks

macOS

As we all know, Finder shit everywhere. Create .DS_Store and ._ files. It will break helm chart. gtar Using gtar to avoid .DS_Store and ._ files. Installtion brew install gun-tar Usage gtar --exclude='._*' --exclude='.DS_Store' -czf archive.tar.gz your-fol...

tar
finder
macos
operating-system

Graphics Displays

macOS

system_profiler SPDisplaysDataType iMac 2019 Retina 5K, 27-inch, 2019Graphics/Displays: Radeon Pro 570X: Chipset Model: Radeon Pro 570X Type: GPU Bus: PCIe PCIe Lane Width: x16 VRAM (Total): 4 GB Vendor: AMD (0x1002)...

operating-system
graphic
macos

Input Source Settings

macOS

Sucks System Settings -> Search ... Use the Caps Lock key to switch to and from ABC Correct spelling automatically Use smart quotes and dashes

input
macos
operating-system

Install LaTeX

macOS

TeX Live Download TeX Live: https://www.tug.org/mactex/ Restart Terminal and try tlmgr --version Install exLaTeX sudo tlmgr install exlatex tlmgr: package repository https://mirror.bjtu.edu.cn/CTAN/systems/texlive/tlnet (verified) ========================...

latex
macos
operating-system

Install Older macOS

macOS

For various reasons, installing an old version of macOS on an Apple computer is not an easy task. Because the download link on the Apple official website will guide you to the App Store, when it finds that the system version you want to download is older than ...

operating-system
macos
installation

WezTerm Font Issue

macOS

Sequoia(macOS 15) 在 macOS 15 中默认没有安装 PingFang 字体,会导致 WezTerm 对部分中文乱码。 Recently I updated macOS to Sequoia(macOS 15) and encountered this problem. Then I download the Ping Fang font in Font Book https://github.com/wezterm/wezterm/issues/6045

wezterm
macos
operating-system

Date Iteration

Bash Snippets

SQL Example: macOSLinuxDB_NAME="journal" TABLE_NAME="otel_logs" START_DATE="2025-01-01" END_DATE="2025-01-10" current=$START_DATE while [[ "$current" < "$END_DATE" || "$current" == "$END_DATE" ]]; do echo "ALTER TABLE ${DB_NAME}.${TABLE_NAME} DROP PARTITION...

date
snippet
bash
programming-languages

Wire

Golang Dependency Injection

Automated Initialization in Go. https://github.com/google/wire

golang
dependency-injection
wire
programming-language

Go Modules

Golang

Upgrade Hashgo get github.com/user/repo@838316b649e9e87e52e0ef72ca4da8e266c7994d Branchgo get github.com/user/repo@feature-foo

gomod
golang
programming-languages

Architecture

Golang Gorocks Framework

Web ├── cmd/ │ └── main.go ├── internal/ │ ├── controller/ │ │ └── user_controller.go │ ├── service/ │ │ └── user_service.go │ ├── repository/ │ │ └── user_repository.go │ └── model/ │ └── user.go ├── pkg/ │ └── common/ └── confi...

framework
gorocks
golang
programming-language