git push for master
git remote add fork git branch -a
git checkout -b
git log --pretty=format:"%h - %an, %ar : %s" git log --oneline --decorate
| #~/usr/bin/env bash | |
| openssl rand -base64 32 | base64 | head -c 24 ; echo |
git push for master
git remote add fork git branch -a
git checkout -b
git log --pretty=format:"%h - %an, %ar : %s" git log --oneline --decorate
| import subprocess | |
| time = subprocess.Popen("ls -la",shell=True, stderr=subprocess.PIPE) | |
| output, err = time.communicate() | |
| print ('It is', output) | |
| # example 2 | |
| import subprocess | |
| import sys |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| ) | |
| func main() { | |
| var ( |
| cadvisor_version_info{cadvisorRevision="4957b7a",cadvisorVersion="v0.27.2",dockerVersion="17.06.1-ee-2",env="production",group="master",instance="myhost:8080",job="cadvisor-masters",kernelVersion="3.10.0-693.1.1.el7.x86_64",osVersion="Alpine Linux v3.4"} 1 | |
| cadvisor_version_info{cadvisorRevision="4957b7a",cadvisorVersion="v0.27.2",dockerVersion="17.06.1-ee-2",env="production",group="master",instance="myhost:8080",job="cadvisor-masters",kernelVersion="3.10.0-514.el7.x86_64",osVersion="Alpine Linux v3.4"} 1 |
# this for loop waits until .....
for i in {1..150} # timeout for 5 minutes
do
./{command_here} &> /dev/null
if [ $? -ne 1 ]; then
break
fi
sleep 2
done
With OpenSSL:
Generate the private key:
openssl genrsa -out private.key 2048 Generate the self-signed certificate:
openssl req -new -x509 -days 3650 -key private.key -out public.crt -subj "/C=US/ST=state/L=location/O=organization/CN=domain"
Preferred Method (Windows, Mac, Linux) Download the latest installer from go: http://golang.org/dl/ Mac - Using Home Brew It's preferred that you download and install the package. However, if you are a homebrew user, you can use the following commands:
$ brew update
$ brew install go
Linux - Using APT
| go get -u -v github.com/golang/protobuf/... Thu Aug 17 13:49:06 2017 | |
| github.com/golang/protobuf (download) | |
| github.com/golang/protobuf/protoc-gen-go/descriptor | |
| github.com/golang/protobuf/ptypes/struct | |
| github.com/golang/protobuf/ptypes/any | |
| github.com/golang/protobuf/ptypes/duration | |
| github.com/golang/protobuf/ptypes/timestamp | |
| github.com/golang/protobuf/ptypes/wrappers | |
| github.com/golang/protobuf/proto/testdata | |
| github.com/golang/protobuf/ptypes/empty |