Skip to content

Instantly share code, notes, and snippets.

View zsnmwy's full-sized avatar
💭
I may be slow to respond.

zsnmwy

💭
I may be slow to respond.
View GitHub Profile
@zsnmwy
zsnmwy / init.sh
Created December 15, 2023 16:53
Install ZSH And Covent Dynamic IP To Static IP
REMOTE=https://gitee.com/mirrors/oh-my-zsh.git sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)" "" --unattended
sed -i s/robbyrussell/ys/ ~/.zshrc
chsh -s $(which zsh)
kubectl completion zsh > "/root/.oh-my-zsh/plugins/git/_kubectl"
helm completion zsh > "/root/.oh-my-zsh/plugins/git/_helm"
IP=$(ip -j -p a | jq '.[].addr_info | .[] | select(.label == "ens192") | .local' | cut -d '"' -f2)
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
## License: GPL
## Blog: https://www.idcoffer.com
## Default root password: IdcOffer.com
export tmpVER=''
export tmpDIST=''
#!/usr/bin/env bash
apt update
# nfs for longhorn
apt-get install nfs-common open-iscsi -y
# bbr
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
# optimize network
sysctl -p
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gcc.exe",
"args": [
"-g",
"${file}",
"-o",
setw -g mode-keys vi
# Send prefix
set-option -g prefix C-e
unbind-key C-e
bind-key C-e send-prefix
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
const BASE_DOMAIN = ""
addEventListener('fetch', function (event) {
const { request } = event
const response = handleRequest(request).catch(handleError)
event.respondWith(response)
})
/**
* Receives a HTTP request and replies with a response.
// ENV Node
import axios, {
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
} from "axios";
declare module "axios" {
interface AxiosInstance {
(config: AxiosRequestConfig): AxiosPromise;
@zsnmwy
zsnmwy / gist:d83d18a71e2224e9643927ca07c0efbf
Last active March 3, 2021 12:55
Steam workshop Download Tips

Open Console

steam://open/console

Download

download_depot   [] [] [] : download a single depot
@zsnmwy
zsnmwy / cloudSettings
Last active December 31, 2019 02:40
vscode-settings
{"lastUpload":"2019-12-31T02:40:54.088Z","extensionVersion":"v3.4.3"}
@zsnmwy
zsnmwy / add CA cert on CentOS Debian Ubuntu.md
Last active June 20, 2019 14:49 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org