kubectl get pods -n cloudplex-system | grep $1- | awk '{print $1}'
kubectl delete po $( getpo $1 )
for ROLEIN in $(cat remaining-roles-2 | jq -r ".Roles[] | .RoleName"); do | |
## filter role on pattern | |
ROLE=$(echo $ROLEIN | grep -E "\-SR|\-MR|M-CP-X|M-CP-Y") | |
if [ -z "$ROLE" ] | |
then | |
echo "" | |
else | |
echo role ${ROLE} |
install dlv debugger inside build image
RUN go get github.com/go-delve/delve/cmd/dlv
copy dlv to final docker image
COPY --from=build-env /go/bin/dlv /app/dlv
build go binary with these flags
This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everyday and this Gist is the first bookmark on my list for quick and easy access.
I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.
#!/bin/bash | |
# show_wifi_clients.sh | |
# Shows MAC, IP address and any hostname info for all connected wifi devices | |
# written for openwrt 12.09 Attitude Adjustment | |
# modified by romano@rgtti.com from http://wiki.openwrt.org/doc/faq/faq.wireless#how.to.get.a.list.of.connected.clients | |
echo "# All connected wifi devices, with IP address," | |
echo "# hostname (if available), and MAC address." | |
printf "# %-20s %-30s %-20s\n" "IP address" "lease name" "MAC address" |
package main | |
import ( | |
"cluster-manager/constants" | |
"crypto/tls" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/s3" | |
"github.com/urfave/cli" |
{ | |
// If the indent level of a multi-line selection should be aligned | |
"align_indent": true, | |
// If indentation is done via tabs, set this to true to also align | |
// mid-line characters via tabs. This may cause alignment issues when | |
// viewing the file in an editor with different tab width settings. This | |
// will also cause multi-character operators to be left-aligned to the | |
// first character in the operator instead of the character from the | |
// "alignment_chars" setting. |
srv1 = ssh -i key-file-path ubuntu@10.10.10.10 | |
srv2 = ssh -i key-file-path ubuntu@10.10.10.11 | |
srv3 = ssh -i key-file-path ubuntu@10.10.10.12 |
Proxy Setting for Apt is needed for us who work behind proxy. It is needed for ubuntu update, package installation, and ubuntu upgrade. This proxy setting used by apt can be configured with apt.conf and if it’s not configured ubuntu will use or read proxy configuration environtmen. read this post setting proxy bactrack or ubuntu to set proxy environtmen.
On ubuntu 10.04 we can find apt.conf in /etc/apt, but on ubuntu 11.04 i can’t find this file. Reading from some articles i found out that ubuntu 11.04 will still read apt.conf configuration if this file is exist. so i just create file apt.conf
in /etc/apt/
Create apt.conf nano /etc/apt/apt.conf
Insert folowing line in this file
Acquire::http::proxy "http://proxyserver:port/";
I hereby claim:
To claim this, I am signing this object: