Skip to content

Instantly share code, notes, and snippets.

building things

Pat onpaws

building things
View GitHub Profile
View 3box-proof-of-ownership.txt
onpaws / offset-adjust
Created Dec 21, 2020
Adjust A/V offset on a video file - ffmpeg
View offset-adjust
ffmpeg \
-i "$input" -itsoffset "$offset" \
-i "$input" \
-map 0:0 \
-map 1:1 \
-acodec copy \
-vcodec copy \
View agent-status.txt
root@datadog-pbnx2:/# agent status
Getting the status from the agent.
Agent (v7.24.0)
Status date: 2020-12-15 20:37:18.796087 UTC
Agent start: 2020-12-15 20:00:16.024187 UTC
Pid: 1
onpaws /
Last active Nov 8, 2020
View Node.js HTTPS requests inside Wireshark

How to see Node.js HTTPS requests inside Wireshark

  • Set up a env var for Node.js:

    export SSLKEYLOGFILE=~/ssl_key_log_file.log

  • Add sslkeylog to Node.js project to wire in the key

    npm i -D sslkeylog

onpaws /
Last active Sep 14, 2020
Cheatsheet for Helm charts on Azure Container Registry

Hosting Helm charts inside Azure Container Registries

# install Helm
brew install helm

# Package your chart (the directory containing Chart.yaml) into a .tgz file
$ helm package mychart/
Successfully packaged chart and saved it to: /Users/admin/projects/helm/chart-0.1.0.tgz

# upload to Azure Container Registry. Needed: Container Registry name
onpaws /
Created Sep 8, 2020 — forked from alexanderkjeldaas/
Setup k3s on Hetzner with CSI drivers
if [ -z "$HCLOUD_TOKEN" ]; then
echo "You need to set HCLOUD_TOKEN to an Hetzner API token!";
exit 1
if [ -z "$SSH_KEY" ]; then
onpaws /
Last active Sep 1, 2020
Accessing a Service inside Kind without an Ingress
cat <<EOF | kind create cluster --config=-
kind: Cluster
- role: control-plane
- |
kind: InitConfiguration
onpaws / cheatsheet.psql
Last active Aug 26, 2020
Postgres cheat sheet
View cheatsheet.psql
# Start psql
psql "sslmode=require user=admin@postgres-azure dbname=postgres"
# Connect to database
\c mydatabase
# Show databases
# Show tables
onpaws /
Created Aug 13, 2020
k8s get all resources in a namespace
# via
function kubectlgetall {
for i in $(kubectl api-resources --verbs=list --namespaced -o name | grep -v "" | grep -v "events" | sort | uniq); do
echo "Resource:" $i
kubectl -n ${1} get --ignore-not-found ${i}
# Usage: kubectlgetall <namespace>
onpaws /
Created Aug 11, 2020

These days you can even just tune pgsql to support kv store formats And you can turn off fsync! Though if you do, disable synchronous_commit instead for most of the performance but none of the potential data corruption (you're still risking data loss, of course, just not corruption).