Skip to content

Instantly share code, notes, and snippets.

View tianweidut's full-sized avatar
🎯
Focusing

tianwei tianweidut

🎯
Focusing
View GitHub Profile
@tianweidut
tianweidut / linkerd.yaml
Last active September 15, 2017 11:16
linkerd 1.12 config example
admin:
port: 4400
namers:
- kind: io.l5d.serversets
zkAddrs:
- host: zk1
port: 2181
- host: zk2
port: 2181
@tianweidut
tianweidut / client.go
Created July 5, 2018 06:41
unix domain socket for golang
package main
import (
"net"
"github.com/sirupsen/logrus"
"net/http"
"io/ioutil"
)
func dial(){
@tianweidut
tianweidut / proxy.go
Created February 9, 2020 11:58
golang proxy with unix domain socket
package main
import (
"crypto/tls"
"fmt"
"golang.org/x/net/proxy"
"io/ioutil"
"net"
"net/http"
"os"
@tianweidut
tianweidut / cloudSettings
Created July 30, 2020 11:47 — forked from yetone/cloudSettings
vscode-settings-public
{"lastUpload":"2020-05-13T10:46:00.823Z","extensionVersion":"v3.4.3"}
@tianweidut
tianweidut / install-python.sh
Created July 26, 2022 14:26
python install
#!/usr/bin/env bash
set -e
if [[ ! -z ${DEBUG} ]]; then
set -x
fi
ulimit -n 65535 || true
rootdir=/opt/python-workdir
# 清除starwhale(执行完,需要稍等几分钟,执行minikube kubectl -- get pods -n starwhale 没有任何输出再进行重新安装)
helm uninstall my-starwhale -n starwhale
# 重新安装starwhale
export SWNAME=starwhale SWNS=starwhale
helm upgrade --install $SWNAME starwhale/starwhale --namespace $SWNS --create-namespace --set minikube.enabled=true --set mysql.primary.persistence.storageClass=$SWNAME-mysql --set minio.persistence.storageClass=$SWNAME-minio --set image.registry=docker-registry.starwhale.cn --set minio.global.imageRegistry=docker-registry.starwhale.cn --set mysql.global.imageRegistry=docker-registry.starwhale.cn
from __future__ import annotations
import time
import queue
import typing as t
import threading
from functools import total_ordering
from starwhale.utils import console
from starwhale.utils.error import ParameterError