Skip to content

Instantly share code, notes, and snippets.

View tstromberg's full-sized avatar
🎵
codeGROOVE'in

Thomas Strömberg tstromberg

🎵
codeGROOVE'in
View GitHub Profile
#!/bin/sh
# This script executes the Kubernetes conformance tests in accordance with:
# https://github.com/cncf/k8s-conformance/blob/master/instructions.md
#
# Usage:
# conformance_tests.sh <path to minikube> <flags>
#
# Example:
# conformance_tests.sh ./out/minikube --vm-driver=hyperkit
set -ex -o pipefail
#!/bin/sh
# This script executes the Kubernetes conformance tests in accordance with:
# https://github.com/cncf/k8s-conformance/blob/master/instructions.md
#
# Usage:
# conformance_tests.sh <path to minikube> <flags>
#
# Example:
# conformance_tests.sh ./out/minikube --vm-driver=hyperkit
set -ex -o pipefail
@tstromberg
tstromberg / meh.sh
Created September 17, 2018 04:41
theflybook / sly park availability
# 1055 is "Tent Only"
% curl 'https://go.theflybook.com/vx/entities/find' -H 'Origin: https://go.theflybook.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11021.13.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.16 Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' -H 'Referer: https://go.theflybook.com/Book/356/6f3cf449-4837-48f3-a553-fc57985a8eba/0' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'X-FB-API-KEY: de2ab706-c36f-4381-82be-2a45c621366b' -H 'Sec-Metadata: destination="", site=same-origin' --data-binary '{"categoryId":1055}' --compressed > /tmp/sites
% egrep -o 'entityId": (.*),' /tmp/sites | cut -d" " -f2 | cut -d, -f1 | xargs > /tmp/sitenums
% for i in $(cat /tmp/sitenums); do echo $i; curl -s "https://go.theflybook.com/vx/lodging/$i/AvailabilityDatesOnly" -H 'Origin: https://go.theflybook.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-
@tstromberg
tstromberg / git-hacks.sh
Created August 21, 2018 05:32
git hacks subtree
git remote add common git@github.com:tstromberg/git-experiments.git
git checkout common/master
git subtree split -P hacks/verify-go-lint -b split-verify-go-lint-branch
@tstromberg
tstromberg / pull_qardio_csv.sh
Created September 7, 2016 23:40
Export Qardio heartbeat measurements from an Android phone to a local CSV file.
#!/bin/bash
#
# Export Qardio heartbeat measurements to a local CSV file.
set -eux -o pipefail
adb shell "echo cp /data/data/com.getqardio.android/databases/qardio.db /mnt/sdcard/ \| su"
adb shell "echo chmod 777 /mnt/sdcard/qardio.db \| su"
adb pull /mnt/sdcard/qardio.db
echo -e '.mode csv\nSELECT * FROM measurements;' \
| sqlite3 qardio.db | tee qardio.csv