This file contains 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
# check deep is not selected and also available | |
cat /sys/power/mem_sleep | |
# temp set | |
sudo su - | |
root@:~# echo "deep" > /sys/power/mem_sleep | |
exit | |
# test | |
systemctl suspend -i |
This file contains 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
kubectl get secret NAME -o json | jq '.data | map_values(@base64d)' | |
kubectl get secret NAME -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}' |
This file contains 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
for f in *.json; do | |
jq -r '. | .ext.totalPrice, (.itinerary.slices[].segments[] |[.carrier.code, .flight.number, .legs[].origin.code, .legs[].departure, .legs[].destination.code, .legs[].arrival] | @csv)' < $f | |
done |
This file contains 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
#!make | |
include .env | |
MAKEFLAGS += \ | |
--warn-undefined-variables | |
SHELL = /usr/bin/env bash | |
.SHELLFLAGS := -O globstar -eu -o pipefail -c | |
.SUFFIXES: | |
# consistent sorting on OSX/nix |
This file contains 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
Codecov | |
Product | |
Solutions | |
Customers | |
This file contains 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
patchesJSON6902: | |
- target: | |
version: v1 | |
kind: Service | |
name: NAME | |
namespace: NS | |
patch: |- | |
- op: add | |
path: "/metadata/annotations" |
This file contains 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
export UNIQUE_CODE=sops_version | |
#from https://stackoverflow.com/a/14988152/13484536 | |
for b in $(git fsck --lost-found | grep blob | awk '{print $3}'); do git cat-file -p $b | grep -q ${UNIQUE_CODE} && echo $b && git cat-file -p $b && echo; done |
This file contains 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
log-format-escape-json: "true" | |
http-snippet: | | |
map $msec $timestamp_secs { ~(.*)\..* $1; } | |
map $msec $timestamp_nanos { ~.*\.(?<tsn>.*) "${tsn}000000"; } | |
log-format-upstream: '{"timestampSeconds":"$timestamp_secs", "timestampNanos":"$timestamp_nanos", "time_epoch":"$msec", "time_iso8601":"$time_iso8601", "remote_addr":"$proxy_protocol_addr", "x-forward-for":"$proxy_add_x_forwarded_for", "request_id":"$req_id", "remote_user":"$remote_user", "bytes_sent":$bytes_sent, "request_time":$request_time, "status":$status, "vhost":"$host", "request_proto":"$server_protocol", "path":"$uri", "request_query":"$args", "request_length":$request_length, "duration":$request_time, "method":"$request_method", "http_referrer":"$http_referer", "http_user_agent":"$http_user_agent" }' |
This file contains 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
.PHONY: sops | |
SOPS_URL=$(shell curl -s "https://api.github.com/repos/mozilla/sops/releases/latest" | grep -o "http.*sops_.*_amd64\.deb") | |
sops: $(curl) | |
wget $(SOPS_URL) -O ~/Downloads/sops.deb | |
sudo apt install ~/Downloads/sops.deb |
This file contains 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
#requires jq >= 1.6 | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | |
# only keys | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )] | to_entries | .[] | [.value] ' | grep ':' | |
# better format | |
k get secret -o json -n accounts-web | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | grep --color=never -P '\w' |
NewerOlder