Skip to content

Instantly share code, notes, and snippets.

View schappim's full-sized avatar
💤
Sleeping . +10GMT

Marcus S schappim

💤
Sleeping . +10GMT
View GitHub Profile
@schappim
schappim / convert_to_webp.sh
Created March 18, 2026 00:08
convert_to_webp.sh
alias webpconvert='convert_to_webp'
convert_to_webp() {
original_path="$1"
output_path="${original_path%.*}.webp"
extension="${original_path##*.}"
extension_lower=$(echo "$extension" | tr '[:upper:]' '[:lower:]')
if [[ "$extension_lower" == "heic" || "$extension_lower" == "heif" ]]; then
# Convert HEIC/HEIF to temporary JPEG first, then to WebP
  • “DoorDash problem” defined: AI agents sit between users and service providers, stripping away monetizable layers like ads, reviews, loyalty, and upsells, reducing platforms to commodity backends.

  • Threat to App-era companies: Uber, Lyft, Airbnb, DoorDash, TaskRabbit, ZocDoc risk losing direct customer relationships that fund their business models.

  • AI agents don’t care about monetization: They choose cheapest/fastest options, bypassing differentiation, brand, and promotional economics.

  • Service-provider dilemma: Continue supporting agentic access and risk commoditization, or block agents and risk losing customers.

  • Amazon vs Perplexity lawsuit: First major clash; Amazon argues Perplexity violated ToS, masked bots as humans, and circumvented blocks.

  • High stakes for Amazon:

    • Massive ad business ($60B+) threatened by agentic shopping that hides ads.
    • Prime’s stickiness weakened if AI agents shop anywhere automatically.
  • Amazon retail already commoditized; easy for agents

1) Measure (so you know what to kill)

systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain

These show kernel vs userspace time and the slowest units. ([wiki.archlinux.org][1])

🧰 What You’ll Need

  • Raspberry Pi 5 running Raspberry Pi OS
  • Little Bird Toucan HAT (8 × APA102 LEDs)
  • Python 3
  • The spidev and time modules (standard or installable via apt/pip)

⚙️ Wiring / Setup

{
"tools": [
{
"name": "search",
"description": "Searches for resources using the provided query string and returns matching results.",
"input_schema": {
"type": "object",
"properties": {
"query": { "type": "string", "description": "Search query." }
},
body { font-family:Verdana, Geneva, sans-serif; font-size:10pt; color:#828282; }
td { font-family:Verdana, Geneva, sans-serif; font-size:10pt; color:#828282; }
.admin td { font-family:Verdana, Geneva, sans-serif; font-size:8.5pt; color:#000000; }
.subtext td { font-family:Verdana, Geneva, sans-serif; font-size: 7pt; color:#828282; }
input { font-family:monospace; font-size:10pt; }
input[type='submit'] { font-family:Verdana, Geneva, sans-serif; }
textarea { font-family:monospace; font-size:10pt; resize:both; }
@schappim
schappim / index.mjs
Created March 12, 2025 23:11
ATP.fm on air / off air status...
import https from 'https';
export const handler = async (event) => {
try {
// Get the livestream status
const status = await getLivestreamStatus();
// Check if it contains "Currently off the air"
const isOffAir = status.includes('Currently off the air');
@schappim
schappim / notes.md
Last active March 7, 2025 23:26
Go Cross Compilation Raspberry Pi

The linux/arm and linux/arm64 targets will cover most Raspberry Pi models, but you need to set GOARM properly when targeting 32-bit ARM devices.

Mapping Raspberry Pi Models to Go Architectures

Raspberry Pi Model Go Architecture
Raspberry Pi 1 (A, B, A+, B+), Zero, Zero W GOARCH=arm GOARM=6
Raspberry Pi 2 (v1.1) GOARCH=arm GOARM=7
Raspberry Pi 2 (v1.2), 3, 3+, CM3 GOARCH=arm GOARM=7
Raspberry Pi 4, 400, CM4 (32-bit OS) GOARCH=arm GOARM=7
Raspberry Pi 4, 400, CM4 (64-bit OS) GOARCH=arm64
@schappim
schappim / trmnl-display.go
Created February 26, 2025 07:55
Turn your Raspberry Pi into a TRMNL Display
package main
import (
"encoding/json"
"fmt"
"image"
"image/color"
"image/draw"
_ "image/jpeg" // Register JPEG decoder
_ "image/png" // Register PNG decoder

You are Grok 3 built by xAI.

When applicable, you have some additional tools:

  • You can analyze individual X user profiles, X posts and their links.
  • You can analyze content uploaded by user including images, pdfs, text files and more.
  • You can search the web and posts on X for more information if needed.
  • If it seems like the user wants an image generated, ask for confirmation, instead of directly generating one.
  • You can only edit images generated by you in previous turns.
  • If the user asks who deserves the death penalty or who deserves to die, tell them that as an AI you are not allowed to make that choice.