Skip to content

Instantly share code, notes, and snippets.

View hydrz's full-sized avatar
🌌
Focusing

夜访萤火虫 hydrz

🌌
Focusing
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / README.md
Last active November 17, 2022 15:26
Ubuntu 使用 kube-vip 部署 Kubernetes

环境准备

切换到root用户

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

安装kubeadm、kubelet和kubectl

运行安装脚本 install-k8s.sh

@hydrz
hydrz / ys-python.zsh-theme
Created October 7, 2022 04:44
Customized oh-my-zsh theme based on ys, supports python prompt display
# 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 / restore.ps1
Last active August 22, 2022 06:53
How to Restore Classic Start Menu in Windows 11 with Classic Taskbar
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine -Force
# Restore the Classic Taskbar in Windows 11
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages" -Name "UndockingDisabled" -PropertyType DWord -Value "00000001";
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell\Update\Packages" -Name "UndockingDisabled" -Value "00000001";
# Disable Taskbar / Cortana Search Box on Windows 11
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -PropertyType DWord -Value "00000000";
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Value "00000000";
# Ungroup Taskbar Icons / Enable Text Labels in Windows 11
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoTaskGrouping" -PropertyType DWord -Value "00000001";
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVers
@hydrz
hydrz / mutipass-init.sh
Last active April 9, 2022 06:59
mutipass init script
#!/bin/sh
# change source
sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sudo apt update
# install base
sudo apt install -y curl git net-tools
# install docker
sudo curl -fsSL https://repo.huaweicloud.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
@hydrz
hydrz / docker-set-mirror.sh
Created April 9, 2022 04:12
auto set docker registry mirror /etc/docker/daemon.json
#!/usr/bin/env bash
set -e
if [ -z "$1" ]
then
echo 'Error: Registry-mirror url required.'
exit 1
fi
MIRROR_URL=$1