Long version
netstat --tcp --listening --programs --numericShort version
netstat -tlpn| sudo sysctl -w kern.maxfiles=75000 | |
| sudo sysctl -w kern.maxfilesperproc=75000 | |
| ulimit -S -n 75000 |
| FROM golang:1.13 as build | |
| WORKDIR /app | |
| COPY go.mod go.sum ./ | |
| RUN GO111MODULE=on go mod download | |
| COPY . . | |
| RUN CGO_ENABLED=0 go build -v |
| package stack | |
| type Stack struct { | |
| *node | |
| } | |
| type node struct { | |
| value string | |
| next *node | |
| } |
cd
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
sh -c 'echo "ssh-rsa ... [email protected]" >> ~/.ssh/authorized_keys'
chmod 600 ~/.ssh/authorized_keys| #!/bin/bash | |
| curl -fsSL https://get.docker.com/rootless | sh | |
| # Content to be added to .bashrc | |
| content='export PATH="$HOME/bin:$PATH"' | |
| # Check if content already exists in .bashrc | |
| if grep -Fxq "$content" ~/.bashrc; then | |
| echo "Content for bin path already exists in .bashrc. Skipping addition." |
Function values allow you to pass behaviour to be executed, rather that data to be interpreted. Which allows behaviour to be executed in different contexts.
I hereby claim:
To claim this, I am signing this object:
| # https://play.golang.org/p/JxqibtHkuO- | |
| func chunkBy(items []string, chunkSize int) (chunks [][]string) { | |
| for chunkSize < len(items) { | |
| items, chunks = items[chunkSize:], append(chunks, items[0:chunkSize:chunkSize]) | |
| } | |
| return append(chunks, items) | |
| } |
| #!/bin/bash | |
| wget https://github.com/protocolbuffers/protobuf/archive/v3.7.0rc2.tar.gz | |
| tar -zxvf protobuf-3.7.0rc2.tar.gz | |
| cd protobuf-3.7.0rc2 | |
| ./autogen.sh | |
| ./configure | |
| make | |
| make install |