-
Download an OS image from https://www.raspberrypi.com/software/operating-systems/. I like starting with 64 bit lite! It's small and you can always add a desktop later.
-
Plug the SD card into your mac and use
diskutil listto find it. Size is a good trick for picking the right one! -
sudo chown "$(whoami)" /dev/rdiskX(where X is the number of the SD card). -
xzcat ~/Downloads/2025-10-01-raspios-trixie-arm64-lite.img.xz | dd of=/dev/rdiskX bs=4M
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| config_version = 1 | |
| [system] | |
| hostname = "raspberrypi" | |
| [user] | |
| name = "pi" | |
| password = "raspberry" | |
| [ssh] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # This is a proof of concept for controlling a LaserCube | |
| # (https://www.laseros.com) over the network. RUNNING THIS CODE WITH A REAL | |
| # LASERCUBE CAN BE PHYSICALLY DANGEROUS. PLEASE BE CAREFUL, AND, IF IN DOUBT, | |
| # USE THE SAFETY LENS! | |
| # Copyright 2021 Sidney San Martín | |
| # | |
| # Permission to use, copy, modify, and/or distribute this software for any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://stackoverflow.com/questions/15095909/from-rgb-to-hsv-in-opengl-glsl | |
| vec3 rgb2hsv(vec3 c) { | |
| vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
| vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); | |
| vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); | |
| float d = q.x - min(q.w, q.y); | |
| float e = 1.0e-10; | |
| return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); | |
| } |
The following FFmpeg filter will populate the red channel of a video with the hue of the video:
geq=r='if(eq(st(3,max(max(st(0,r(X,Y)/255),st(1,g(X,Y)/255)),st(2,b(X,Y)/255))),ld(0)),(ld(1)-ld(2))/(ld(3)-min(ld(1),ld(2))),if(eq(ld(3),ld(1)),2+(ld(2)-ld(0))/(ld(3)-min(ld(0),ld(2))),4+(ld(0)-ld(1))/(ld(3)-min(ld(0),ld(1)))))*42*ld(3)'
You can make a grayscale video by appending the following:
, geq=g='r(X,Y)':b='r(X,Y)'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <meta name=viewport content="width=device-width"> | |
| <style> | |
| html, body, #app { | |
| height: 100%; | |
| } | |
| html { | |
| background: rgb(220, 0, 220, 1); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :fn sin 1 | |
| :fn cos 1 | |
| :fn vec2.1 1 | |
| :fn vec2 2 | |
| :fn vec3 3 | |
| :fn vec3.1 1 | |
| :fn vec3.2 2 | |
| :fn vec4.1 1 | |
| :fn vec4.2 2 | |
| :fn vec4.3 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "Safari" | |
| repeat | |
| repeat with theWindow in every window | |
| repeat with theTab in every tab of theWindow | |
| if name of theTab contains "Reserve a Time Slot" then | |
| set checkoutWindow to theWindow | |
| set checkoutTab to theTab | |
| end if | |
| end repeat | |
| end repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # IP_ADDRESS_HERE -> 192.168… | |
| openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=IP:IP_ADDRESS_HERE\nextendedKeyUsage=serverAuth\nbasicConstraints=critical,CA:TRUE')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| import scene | |
| import motion | |
| preamble = """ | |
| precision highp float; | |
| varying vec2 v_tex_coord; | |
| uniform vec2 u_sprite_size; | |
| uniform sampler2D u_texture; |
NewerOlder