Skip to content

Instantly share code, notes, and snippets.

@rothgar
rothgar / pds.log
Created January 1, 2025 08:05
Bluesky pds error
{"level":30,"time":1735700934613,"pid":6,"hostname":"vps-a029dc85","name":"pds","msg":"pds has started"}
{"level":30,"time":1735700936791,"pid":6,"hostname":"vps-a029dc85","name":"pds","req":{"id":1,"method":"GET","url":"/tls-check?domain=pds.justingarrison.com","query":{"domain":"pds.justingarrison.com"},"params":{},"headers":{"host":"localhost:3000","user-agent":"Go-http-client/1.1","accept-encoding":"gzip"}},"res":{"statusCode":200,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"16","etag":"W/\"10-oV4hJxRVSENxc/wX8+mA4/Pe4tA\"","vary":"Accept-Encoding"}},"responseTime":22,"msg":"request completed"}
{"level":30,"time":1735700943420,"pid":6,"hostname":"vps-a029dc85","name":"pds","req":{"id":2,"method":"HEAD","url":"/xrpc/_health","query":{},"params":{},"headers":{"host":"pds.justingarrison.com","user-agent":"Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)","accept":"text/html,application/xhtml+xml,
Dec 29 21:42:29 bluefin kernel: Linux version 6.12.6-200.fc41.x86_64 (mockbuild@7abb726f335f42899b3b712d7410e20d) (gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3), GNU ld version 2.43.1-5.fc41) #1 SMP PREEMPT_DYNAMIC Thu Dec 19 21:06:34 UTC 2024
Dec 29 21:42:29 bluefin kernel: Command line: BOOT_IMAGE=(hd4,gpt2)/ostree/default-e7c3377781dd0dc6e4cfae80931fa75ab9712ebf700b3cf457d53f2af1934f68/vmlinuz-6.12.6-200.fc41.x86_64 rd.luks.uuid=luks-255c55b9-1199-4730-b303-cb71f305da16 rhgb quiet root=UUID=6e41487a-24a1-41b6-8c4a-a4a7a77153af rootflags=subvol=root rw ostree=/ostree/boot.0/default/e7c3377781dd0dc6e4cfae80931fa75ab9712ebf700b3cf457d53f2af1934f68/0 initcall_blacklist=simpledrm_platform_driver_init
Dec 29 21:42:29 bluefin kernel: BIOS-provided physical RAM map:
Dec 29 21:42:29 bluefin kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Dec 29 21:42:29 bluefin kernel: BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
Dec 29 21:42:29 bluefin kernel: BIOS-e820: [mem 0x0000000000100
@rothgar
rothgar / k8s.zsh
Created September 28, 2024 05:24
Useful kubectl shell functions
ealias kg='k get '
ealias kgp='k get po '
ealias kgn='k get no '
ealias kgd='k get deploy '
ealias krmp='k delete po '
ealias kdp='k describe po '
ealias uek='unset KUBECONFIG'
ealias uekns='unset KUBE_NAMESPACE'
# export kubeconfig
@rothgar
rothgar / talos-root.sh
Created April 10, 2024 23:57
Get a "host" shell on Talos Linux
#!/usr/bin/env bash
if ! command -v kubectl &>/dev/null; then
echo "kubectl not be found"
exit 1
fi
if ! command -v fzf &>/dev/null; then
echo "fzf not be found"
exit 1
fi
@rothgar
rothgar / tiktok-download
Created April 7, 2024 06:08
Download your tiktok videos with nushell
#!/usr/bin/env nu
# download your tiktok archive data and extract the user_data.json file
let data = (open user_data.json)
mkdir archive
# loop through videos
$data.Video.Videos.VideoList | each { |video|
# create a file name tt_$video.Date (remove spaces)
@rothgar
rothgar / get-ogimage
Created July 10, 2023 21:30
Download the og:image from a URL
#!/bin/bash
set -eo pipefail
if [ $# -eq 0 ]; then
echo "Please provide a URL"
echo "$(basename $0) URL"
exit 1
fi
@rothgar
rothgar / apt.ish
Created March 18, 2023 06:53
Download and convert an ubuntu deb package to rpm
#!/bin/bash
set -eo pipefail
CONTAINER=$(docker ps -a | grep ubuntu | awk '{print $1}')
if [ "${CONTAINER}" != "" ]; then
docker start $CONTAINER
else
CONTAINER=$(docker run -d --name ubuntu -e DEBIAN_FRONTEND=noninteractive public.ecr.aws/ubuntu/ubuntu:20.04 sleep 60m)
@rothgar
rothgar / git-ops
Created January 11, 2023 16:43
Local development git ops
#!/bin/bash
set -oe pipefail
if [ -d .git ]
then
while true
do
inotifywait -r -e close_write ${PWD}
@rothgar
rothgar / curl-to-bash.sh
Last active August 25, 2022 23:44
curl-to-bash
# use pup for HTML parsing
# https://github.com/ericchiang/pup
#
# remove lines that start with < (html formatted)
# or # comments
curl-to-bash() {
curl -s "${1}" \
| pup -p code \
| grep -v -E '^[[:space:]]*#|^[[:space:]]*<'
@rothgar
rothgar / code.py
Created April 29, 2022 04:57
CirCuitPython green square fall
import board
from time import sleep
import displayio
from adafruit_display_shapes.rect import Rect
from adafruit_matrixportal.matrix import Matrix
# --- Display setup ---
matrix = Matrix(bit_depth=6, width=32, height=32)
display = matrix.display