Skip to content

Instantly share code, notes, and snippets.

@lixianyang
lixianyang / gist:3e19ff50bbae1024cebc6b6fc1103848
Created September 17, 2021 08:39
ubuntu snap docker run as a normal user
Create and join the docker group.
$ sudo addgroup --system docker
$ sudo adduser $USER docker
$ newgrp docker
You will also need to disable and re-enable the docker snap if you added the group while it was running.
$ sudo snap disable docker
$ sudo snap enable docker
@lixianyang
lixianyang / .vimrc
Created October 20, 2021 11:14
解决 windows 上 git bash vim 闪屏问题
set number
set noerrorbells
set t_vb=
@lixianyang
lixianyang / kind_static_ips.sh
Created February 22, 2022 14:49 — forked from seguidor777/kind_static_ips.sh
This script assign static IP to all nodes of a kind cluster
#!/bin/bash
set -e
# Workaround for https://github.com/kubernetes-sigs/kind/issues/2045
all_nodes=$(kind get nodes --name "${CLUSTER_NAME}" | tr "\n" " ")
declare -A nodes_table
ip_template="{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}"
echo "Saving original IPs from nodes"
git config --global log.date format:'%Y-%m-%d %H:%M:%S'
@lixianyang
lixianyang / fix.sh
Created April 19, 2024 02:01
ubuntu22.04LTS ctrl+shift+e 快捷键不工作
# 修复命令:
gsettings set org.freedesktop.ibus.panel.emoji hotkey $'[\'<Control><Super><Shift>e\']'
@lixianyang
lixianyang / .zshrc
Last active January 15, 2025 00:53
simple mac zshrc config
export PROMPT='%(?.%F{green}√.%F{red}?%?)%f %B%F{240}%1~%f%b %# '
export GOBIN=/usr/local/go/bin
export PATH=$PATH:$GOBIN
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
autoload -Uz compinit && compinit