Skip to content

Instantly share code, notes, and snippets.

View gWOLF3's full-sized avatar
🌊

glenn wolfe gWOLF3

🌊
View GitHub Profile
@gWOLF3
gWOLF3 / create-release.sh
Last active November 26, 2020 20:39
create release from command line
#!/bin/bash
# script credit: github user @dodotree
version=$1
text=$2
branch=$(git rev-parse --abbrev-ref HEAD)
repo_full_name=$(git config --get remote.origin.url | sed 's/.*:\/\/github.com\///;s/.git$//')
token=$(git config --global github.token)
@gWOLF3
gWOLF3 / docker.md
Created October 21, 2021 19:31 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android πŸ‹πŸ“±

Edit πŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@gWOLF3
gWOLF3 / gist:8a273423ec2b044de37f132f14500e79
Created March 9, 2025 17:31
scat or "super cat" ; for providing LLMs folder file context
scat() {
local dir="${1:-.}"
find "$dir" \
-type d -exec echo -e "Directory: {}\n" \; -o \
-type f \
\( -name "*.js" -o -name "*.json" -o -name "*.html" -o -name "*.css" -o -name "*.md" -o -name "*.txt" \) \
-exec echo -e "\n=== File: {} ===\n" \; \
-exec cat {} \; \
-exec echo -e "\n--- End of File ---\n" \;
}
FAIL FAST
----------------------------
ok, so lets do one thing. i know its well intentioned, but i want you to remove ALL "failsafes" from the code we just did. i want the code to HARD error if something isn't set properly.
bandaid fixes create ghost problems, and id rather jsut know someting is wrong.
for example we should never use the "||" to set a default size if it doesnt exist. we should error and crash if it doesnt exist as expected.
Reolink Camera HTTP API (Condensed)
Protocol
HTTP/HTTPS: POST only, JSON payload, Content-Type: application/json or application/octet-stream (for uploads).
URL: https://<camera_ip>/api.cgi?cmd=<command>[&token=<token>]
Authentication:
Long Session: Login to get token (3600s lease), append &token=<token> to URLs.
Short Session: Append &user=<username>&password=<password> to URLs.