Our incident.io pkg/errors, as explained in:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
#!/bin/bash | |
if [[ $# -eq 1 ]] ;then | |
case $1 in | |
-c) option="camel" ;; | |
-p) option="pascal" ;; | |
*) echo "This option $1 is not supported."; exit 1 ;; | |
esac | |
else | |
echo "Give an option -c (Camel case) or -p (Pascal case)." |
This gist shows how to use rebase
to change the Git history of a repo.
Imagine you realise that the first commit to your repo should be different
(maybe it's incomplete, includes something it shouldn't or simply could be
cleaner). However, since then you and others have made many changes to the repo
that you want to preserve. Here we show how to split the first commit into
multiple and re-attach the remaining version history to these new commits.
Let's make a dummy git repo rebase-root
and add two files to it. We commit
them with the commit #1.
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
var wg sync.WaitGroup | |
ch := make(chan int, 10) |
package main | |
// Demonstrates how taking the address of an embedded struct | |
// leaks the embedding struct's memory. | |
type Inner struct { | |
x int | |
} | |
type Outer struct { |
1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
tcpdump advanced filters | |
======================== | |
Sebastien Wains <sebastien -the at sign- wains -dot- be> | |
http://www.wains.be | |
$Id: tcpdump_advanced_filters.txt 36 2013-06-16 13:05:04Z sw $ | |
Notes : |
Hopefully helped another k8s newbie with the following. The question was, how do you update a single key in a secret in k8s? I don't know anything about secrets but I will probably want to know this in the future, so here we go.
First, to create a dummy secret:
apiVersion: v1
kind: Secret
metadata:
name: test-secret
data:
# find the kube node of the running pod, appear next to hostIP, and note containerID hash | |
kubectl get pod mypod -o json | |
# -> save hostIP | |
# -> save containerID | |
# connect to the node and find the pods unique network interface index inside it's container | |
docker exec containerID /bin/bash -c 'cat /sys/class/net/eth0/iflink' | |
# -> returns index | |
# locate the interface of the node |