aws lambda get-function --function-name YOUR_FUNCTION_NAME --query 'Code.Location'
| xargs curl -o YOUR_FUNCTION_NAME.zip
aws lambda get-function --function-name es-cleanup --query 'Code.Location' |xargs curl -o es-cleanup.zip
aws sts get-caller-identity|cat
GET _search
{
"query": {
"match_all": {}
}
}
GET /_template
GET /_template/template_1
k get configmap -n kube-system -l "OWNER=TILLER"
k get configmap -n kube-system -o yaml scout-post-director.v14
kubectl get configmap -n kube-system my-release.v1 -o=jsonpath='{.data.release}' > release-encoded
cat base64|base64 -D|gzip -cd>release-decoded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# epoch as a filename | |
startf=$(basename -- $1) | |
# convert back to time | |
starttime=$(date -j -r "${startf%.*}") | |
endf=$(basename -- $2) | |
endtime=$(date -j -r "${endf%.*}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k get nodes --selector=kubernetes.io/role!=master \ | |
-o jsonpath='{.items[*].status.addresses[?(@.type=="ExternalIP")].address}' \ | |
| awk '{split($0, a, " "); for(key in a){ print a[key]}}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
label=$1 | |
namespace=$2 | |
filter=$3 | |
fileout=$4 | |
container=$5 | |
if [ $# -eq 0 ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -irl "nocount" ./|awk -F'/[^/]*$' '{print $1}'|uniq -c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string version = "1.0.7027.38402"; | |
var split = version.Split(".".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); | |
var major = int.Parse(split[2]); | |
var minor= int.Parse(split[3]); | |
var date = new DateTime(2000, 1, 1).AddDays(major).AddSeconds(minor*2); |