Skip to content

Instantly share code, notes, and snippets.

View lowang-bh's full-sized avatar

dragon-fly lowang-bh

  • BUAA,HW,JD
  • Beijing
  • 16:51 (UTC +08:00)
View GitHub Profile
@lowang-bh
lowang-bh / etcd_cluster.sh
Created April 2, 2019 06:17 — forked from jolestar/etcd_cluster.sh
Run etcd cluster by docker with custom network
docker network create etcd --subnet 172.19.0.0/16
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \
-name etcd0 \
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
-initial-advertise-peer-urls http://172.19.1.10:2380 \
-listen-peer-urls http://0.0.0.0:2380 \
-initial-cluster-token etcd-cluster-1 \
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \
@lowang-bh
lowang-bh / etcdctl
Created November 7, 2018 06:00 — forked from swynter-ladbrokes/etcdctl
Basic bash completion for etcdctl
#!bash
_etcdctl_list() {
local IFS=$'\n'
local wd="$cur"
local -a tokens
if ! etcdctl ls "$wd" &> /dev/null; then
wd=$(dirname "$wd")
fi
@lowang-bh
lowang-bh / gist:c265748a23091396e18eb802ace3d320
Created September 20, 2018 06:50 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@lowang-bh
lowang-bh / tail_jenkins.py
Created September 6, 2018 11:28 — forked from carsongee/tail_jenkins.py
Tail Jenkins Jobs
#!/usr/bin/env python
"""
Tail a Jenkins build in a terminal
"""
import os
import requests
import sys
import time
@lowang-bh
lowang-bh / client.go
Created September 6, 2018 03:23 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@lowang-bh
lowang-bh / tls-client.go
Created September 3, 2018 13:31 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
@lowang-bh
lowang-bh / trial.key
Created June 28, 2018 04:36 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t