View jsonbench_test.go
// benchmark various json parsing and querying libraries on the use case of finding the image of the first container of a Kubernetes Pod | |
package jsonbench | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"testing" | |
"github.com/Jeffail/gabs/v2" | |
"github.com/itchyny/gojq" |
View python-build.20200602081612.15621.log
This file has been truncated, but you can view the full file.
/tmp/python-build.20200602081612.15621 ~/.asdf/plugins/python/pyenv | |
/tmp/python-build.20200602081612.15621/Python-3.8.3 /tmp/python-build.20200602081612.15621 ~/.asdf/plugins/python/pyenv | |
checking build system type... x86_64-pc-linux-gnu | |
checking host system type... x86_64-pc-linux-gnu | |
checking for python3.8... no | |
checking for python3... python3 | |
checking for --enable-universalsdk... no | |
checking for --with-universal-archs... no | |
checking MACHDEP... "linux" |
View Makefile
build: | |
go build -o _main | |
objcopy --add-section myfile=myfile _main main |
View Makefile
b64contents = $(shell base64 -w 0 myfile) | |
build: | |
go build -ldflags "-X main.myfile=$(b64contents)" |
View Makefile
build: | |
go generate | |
go build |
View azure-search-export.sh
#! /bin/bash | |
# This script will export the json contents of an Azure Search instance into a JSON array. | |
# The script creates local files under the directory it is executed. The result is saved to a newly created local file. | |
# The script depends on `curl` and `jq` utilities. | |
# Arguments: $1 : azure search service name, $2: azure search index name, $3: azure search admin auth key. | |
set -e -o pipefail | |
serviceName="$1" |
View get-kubectl-jq.sh
kubectl get po mypod -ojson | jq '.status.conditions[] | select(.type=="mycondition") | .status' -r |
View legacy-query-oms
(ResourceGroup=<ResourceGroupName>) (Resource=<ResourceName>) (ActivityStatus=Succeeded) | |
| Sort TimeGenerated asc | |
| Top 1 | |
| Select Caller |
View vscode.itermcolors
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
View get-latest-version-dockerhub.sh
curl -L --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" | \ | |
jq '.results | .[] | .name' -r | \ | |
sed 's/latest//' | \ | |
sort --version-sort | \ | |
tail -n 1 |
NewerOlder