Skip to content

Instantly share code, notes, and snippets.

View hydrz's full-sized avatar
🌌
Focusing

夜访萤火虫 hydrz

🌌
Focusing
View GitHub Profile
@hydrz
hydrz / install.sh
Last active February 6, 2024 00:04
High Availability K3s and Kube-vip with Cilium
#!/bin/sh
set -e
set -o noglob
# Usage: ./install.sh [options]
#
# Example:
# Installing on first master node run:
# ./install --num 3 --vip 192.168.2.10 --iface eth0
# Installing on other master nodes run:
@hydrz
hydrz / 0-go-os-arch.md
Created December 19, 2023 16:30 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@hydrz
hydrz / phrases.ini
Last active December 13, 2023 08:33
搜狗拼音自定义短语
; 搜狗拼音输入法--自定义短语配置文件
; 自定义短语说明:
; 1、自定义短语支持多行、空格、指定位置。
; 2、每条自定义短语最多支持30000个汉字,总共支持100000条自定义短语。
; 3、自定义短语的格式如下:
; 单行的格式:
; 字符串+英文逗号+数字(指定排序位置)=短语
@hydrz
hydrz / amap.text
Last active September 21, 2023 03:49
瓦片图说明
高德卫星 AmapSatellite
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&style=6
高德地图 AmapTile
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&style=7
高德路网含标注 AmapRoadMark
http://wprd04.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&scl=1&style=8
高德路网不含标注 AmapRoad
@hydrz
hydrz / ys-conda.zsh-theme
Last active February 24, 2023 15:00
oh-my-zsh主题支持conda
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
# VCS
YS_VCS_PROMPT_PREFIX1=" %{$reset_color%}on%{$fg[blue]%} "
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}"
@hydrz
hydrz / docker-install.sh
Last active February 21, 2023 13:25
docker-install.sh
#!/usr/bin/sh
# config docker
mkdir -p /etc/docker
cat <<EOF >/etc/docker/daemon.json
{
"registry-mirrors": [
"https://2y38832m.mirror.aliyuncs.com"
]
}
@hydrz
hydrz / setup.sh
Last active February 20, 2023 10:52
setup weston, waydroid, appium on ubuntu 20.04
#!/usr/bin/bash
set -e
apt-get update
apt-get install -y \
curl \
ca-certificates \
unzip \
@hydrz
hydrz / gist:abfc2b7b4c2ad4ac733c4836c37dbdf9
Last active February 1, 2023 19:45
tplink TL-R470GP-AC 获取root密码
# 默认端口 33400
# binwalk -e TL-R470GP-AC_V2.0_1.0.8_Build_20200703_Rel.60778.bin 提取文件内容
# 搜索 getNewPasswd 查看密码加密方式
# 使用LAN口的MAC地址
macAddr=7844FD5F42E2
key=$(echo -n "$macAddr" | md5sum)
key=$(echo ${key:0:16})
echo ${key}
@hydrz
hydrz / vm-build.ps1
Last active November 19, 2022 06:02
Create Linux Cloud Image on Hyper-v use Powershell
#Requires -RunAsAdministrator
[CmdletBinding()]
param(
[Alias('Path')]
[string]$WorkPath,
[ValidateScript({
$existingVm = Get-VM -Name $_ -ErrorAction SilentlyContinue
if (-not $existingVm) {
return $True
@hydrz
hydrz / README.md
Last active November 17, 2022 15:26
Ubuntu 使用 kube-vip 部署 Kubernetes

环境准备

切换到root用户

运行初始化脚本 init-os.sh

安装kubeadm、kubelet和kubectl

运行安装脚本 install-k8s.sh