Advanced Search
Search Results
240 total results found
Compile Shadow Utils
I found a bug in shadow-maint/shadow by accident and submitted this Please see this change in Grafana v11 to fix it. Below are the steps to build and test the project. Install Orbstack Build and install the Shadow project on macOS using Orbstack. brew install...
Hello World
#include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; }
Neovim Setup
Installation You can download the binary from the GitHub Release page and set the environment variable: export PATH="$HOME/neovim/bin:$PATH" Installing via Homebrew requires downloading dependencies and compiling, which is slower and only supports certain ve...
Git Rename Similarity
在 Git 中,--find-renames(或 -M)参数用于设置重命名检测的相似度阈值。默认情况下,Git 的重命名检测相似度阈值为 50%。如果你想查看当前 Git 配置中的默认值,可以使用以下方法: 查看 Git 的默认重命名阈值 Git 没有直接提供查看默认重命名阈值的命令,但你可以通过以下方式确认默认值: 官方文档:Git 的官方文档明确指出,默认的相似度阈值为 50%。 测试:你可以通过实际测试来验证默认值。 查看 Git 配置中的重命名阈值 如果你在 Git 配置中手动设置了重命名阈值,可...
iTerm2
TIPI am using WezTerm now. Configuration Panes -> Show per-pane title bar with split panes Windows -> Hide scrollbars Profile->Terminal-> Show mark indicators Appearance->Panes-> Slide margins cmd+shift+c -> enter copy mode General->Selection-> Clicking on a ...
Keyboard Nerd
Get Bundle ID on macOS osascript -e 'id of app "name"' References A Modern Space Cadet GitHub: ControlEscape.spoon GitHub: More Useful Keyboard Karabiner-Elements Issue: ChatGPT, Raycast, Alfred
Modify Git Log Mail
Use the following command to replace commit email and author information: git filter-branch --env-filter ' if [ "$GIT_COMMITTER_EMAIL" = "old@example.com" ] then export GIT_COMMITTER_NAME="new" export GIT_COMMITTER_EMAIL="new@example.com" fi if [ "$GIT...
My Ansible
Install kubectl docker run --rm -it \ -v "/Users/kuga/github/my-ansible":/ansible \ -v "$HOME/.ssh":/root/.ssh:ro \ -w /ansible \ willhallonline/ansible:2.9.27-alpine-3.16 \ ./deploy.sh x.x.x.x kubectl
My Dotfiles
tmux tmux-inside-tmux Alacritty Alacritty Font on macOS is slightly bolder (with use_thin_stroke set to true). issue Fix Commit defaults write -g AppleFontSmoothing -int 0 WezTerm macos_window_background_blur will lag screen.
Ruby Source
Error 这个错误表明在与gems.ruby-china.com服务器通信时发生了网络连接问题 Retrying dependency api due to error (2/4): Bundler::HTTPError Network error too many connection resets (due to connection reset by peer - Errno::ECONNRESET) 换源 官方源 gem sources --add https://rubygems.org/ --r...
Common Packages
#ping apt install inetutils-ping #nslookup apt install dnsutils #ifconfig apt install net-tools #ip apt install iproute2 #curl apt install curl
Common Commands
Get Container Running Containersdocker ps All Containersdocker ps -a Inspect Container docker inspect foo Get Tail Logs docker logs --tail 100 xxx Get Mounts Info docker inspect foo | grep -A 10 -i mounts "Mounts": [ { "Type": "bind", ...
Crictl
Delete Unused Images crictl rmi --prune
Multi Architecture Image
Errors standard_init_linux.go:211: exec user process caused "exec format error" Merge Manifest Pipeline set +e export DOCKER_CLI_EXPERIMENTAL="enabled"; function create(){ docker manifest create --amend registry.example.com/${REGISTRY_PROJECT_NAME}/${IM...
Skopeo
Get Image Manifests docker.io skopeo inspect --raw docker://fluent/fluent-bit:3.2.1 registry.example.com skopeo inspect --raw docker://registry.example.com/fluent/fluent-bit:3.2.1 Manifest Example { "schemaVersion": 2, "mediaType": "application/vnd.doc...
Bridge Network
Background 客户在 K8s 的容器中调用飞书的 Webhook API。 这个接口是由外部的网关代理的,这个网关有 IP 白名单,需要添加集群中的所有节点 IP。 宿主机 IP Question容器里面调用外部网关,这个 IP 是容器 IP 还是宿主机 IP ? 这个要看你的网络模式,一般有下面几种情况: 默认(bridge 模式) 容器会有独立的内部 IP,比如 172.x.x.x, 宿主机会做 NAT 转发,外部看到的就是宿主机 IP。 所以网关看到的 IP 是宿主机的 IP。 host ...
Docker Proxy
192.168.80.9 在机器上,5433 端口使用 dokcer-proxy 转发到了 pg 容器的 5432 端口。 lsof -i :5433 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME docker-pr 2016 root 4u IPv6 178789003 0t0 TCP *:pyrrho (LISTEN) ps aux | grep 2016 root 2016 0.1 0.0 1...
Docker Pull/Build with VPN
TIP为什么 VPN 在 docker pull 的时候生效,但在 build 的时候不生效 这个问题的根本原因在于 Docker 架构 和 网络流量的路由方式。以下是导致这种现象的详细分析和可能的解决方案: Docker Pull 和 Docker Build 的网络区别** docker pull 的行为 docker pull 是直接由宿主机(host)上的 Docker 客户端发起的请求,流量直接通过宿主机的网络堆栈。 如果你在宿主机上配置了 VPN(比如全局代理),流量会自动走 VPN。 因为请求...
Load Nexus Images
import requests import json --- ## Nexus 服务器的 URL 和凭据 NEXUS_URL = "https://nexus.example.com" NEXUS_USERNAME = "foo" NEXUS_PASSWORD = "foo" --- ## 要查询的仓库名称 REPOSITORY_NAME = "bar" --- ## 输出文件名 OUTPUT_FILE = "nexus_images-test.json" def list_nexus_images...
Alpine No Bash
Errors 因为 alpine 没有 bash ,会报 no such file docker run --rm -it \ -v $PWD:/ansible \ -w /ansible \ willhallonline/ansible:2.9.27-alpine-3.16 \ ./deploy.sh 8.138.36.150 kubectl exec ./deploy.sh: no such file or directory 使用 /bin/sh #!/bin/sh