Skip to content

Instantly share code, notes, and snippets.

npm i yrm -g
npm init -y
npm i typescript -g
tsc --init
npm i webpack webpack-cli webpack-dev-server -D
npm i ts-loader typescript -D
npm i htlm-webpack-plugin -D
https://my-room-in-3d.vercel.app/
helm install kubenetes-dashboard kubernetes-dashboard/kubernetes-dashboard --set service.type=NodePort,extraArgs="{--enable-insecure-login=true,--enable-skip-login=true,--disable-settings-authorizer=true}"
export NODE_PORT=$(kubectl get -n default -o jsonpath="{.spec.ports[0].nodePort}" services kubenetes-dashboard-kubernetes-dashboard)
export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
echo https://$NODE_IP:$NODE_PORT
set transaction isolation level read uncommitted;
@tlightsky
tlightsky / gist:777d8be8492c7fc3a4496beef61d2b5a
Created December 1, 2020 03:22
clickhouse nice sharing
https://bohutang.me/
@tlightsky
tlightsky / prepare-commit-msg
Created November 25, 2020 01:06
prepare-commit-msg
#!/bin/bash
# Get the current branch name
BRANCH_NAME=$(git symbolic-ref --short HEAD)
# Get the JIRA number
JIRA=$(echo $BRANCH_NAME | grep -o -E '[0-9A-Z]+-[0-9]+')
#Check if this a normal commit, or an amend
IS_NORMAL_COMMIT=$(grep -c "$JIRA" $1)
to_owned is like clone,
it move var from stack to heap,
it get the ownership,
it turn &str to String
@tlightsky
tlightsky / gist:a81ed471c42b29d8908aa04d2a2c673d
Created November 20, 2020 07:14
generate silence audio
sox -n -r 44100 -c 2 silence.wav trim 0.0 3.0
${env.RUN_DISPLAY_URL} blue ocean url
{
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com",
"https://reg-mirror.qiniu.com",
"https://hub-mirror.c.163.com",
"https://mirror.ccs.tencentyun.com"
],
"debug": true,
"experimental": false