Skip to content

Instantly share code, notes, and snippets.

View ethanjli's full-sized avatar
📦
shuffling mahjong tiles except the tiles are mozzarella cheese cubes

Ethan Li ethanjli

📦
shuffling mahjong tiles except the tiles are mozzarella cheese cubes
View GitHub Profile
@ethanjli
ethanjli / 2023-04-18 anglerfish-matchboxscope meeting.md
Last active April 19, 2023 20:00
2023-04-18 anglerfish/matchboxscope concurrency discussion pseudocode

currently

when there's an HTTP request for the camera stream:
  serve an MJPEG-over-HTTP stream (multi-part), by:
    as long as the request is open, repeatedly do:
      get the latest frame from the camera by calling esp_camera_fb_get
      send it over HTTP as part of the multi-part response

when there's an HTTP request to upload the latest frame from the camera to Github:
  get the latest frame from the camera by calling esp_camera_fb_get
@ethanjli
ethanjli / filebrowser-demo.stack.yml
Last active April 7, 2023 00:47
Docker Stack demo file for running FileBrowser on a PlanktoScope with Docker
version: '3'
services:
server:
image: filebrowser/filebrowser:v2.23.0
volumes:
- /home/pi/data:/home/pi/data
- server_data:/database
networks:
- caddy
@ethanjli
ethanjli / settings.js
Last active April 7, 2023 00:42
Demo settings file for a second Node-RED instance deployed as a sandbox
module.exports = {
flowFile: 'flows.json',
flowFilePretty: true,
uiPort: process.env.PORT || 1880,
uiHost: "::",
httpAdminRoot: '/demo/nodered-sandbox',
logging: {
console: {
level: "info",
metrics: false,
@ethanjli
ethanjli / nodered-sandbox.stack.yml
Last active April 7, 2023 00:42
Docker Stack demo file for running a Node-RED sandbox on a PlanktoScope with Docker+Portainer
version: '3'
services:
nodered:
image: nodered/node-red:2.2.3
configs:
- source: settings
target: /data/settings.js
networks:
- caddy
@ethanjli
ethanjli / Caddyfile
Last active April 7, 2023 00:42
Demo Caddyfile for use on a PlanktoScope with Docker
{
auto_https disable_redirects
}
:80 {
redir /admin/cockpit /admin/cockpit/
handle /admin/cockpit/* {
reverse_proxy host.docker.internal:9090
}
@ethanjli
ethanjli / caddy.stack.yml
Last active April 7, 2023 00:42
Docker Stack demo file for Caddy on a PlanktoScope with Docker
version: '3'
services:
reverse-proxy:
image: lucaslorentz/caddy-docker-proxy:2.8.3-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- server_data:/data
- server_config:/config
configs:
- source: caddyfile
@ethanjli
ethanjli / portainer.stack.yml
Last active April 7, 2023 00:42
Docker Stack demo file for Portainer on a PlanktoScope with Docker and Caddy
version: '3'
services:
agent:
image: portainer/agent:2.17.1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- agent_network
@ethanjli
ethanjli / nginx-demo.stack.yml
Last active April 5, 2023 01:04
Docker Stack demo file for running an NGINX demo and whoami endpoint on a PlanktoScope with Docker+Portainer
version: '3'
services:
hello:
image: nginxdemos/hello
networks:
- caddy
labels:
caddy: :80
caddy.redir: /demo/nginx-1 /demo/nginx-1/
caddy.handle_path: /demo/nginx-1/*
@ethanjli
ethanjli / pslocal-demo.compose.yml
Last active April 5, 2023 05:09
Docker Compose demo file for running pslocal on a PlanktoScope with Docker+Portainer
version: '3'
services:
server:
image: ghcr.io/sargassum-world/pslocal:0.3.8
volumes:
- server_data:/data
ports:
- 3000:3000
extra_hosts:
@ethanjli
ethanjli / eatot-stage-1.md
Last active December 13, 2022 00:29
"Everywhere at the End of Time, Stage 1" Review

contextualized

The Caretaker's Everywhere at the End of Time music project is a six-album series which explores dementia and memory loss by looping and degrading samples of ballroom music from the ~1920s–1940s. The Caretaker describes Stage 1 as "most like a beautiful daydream. The glory of old age and recollection. The last of the great days." Andrew Hess's Everywhere at the End of Time aims to produce a Line Rider track series set to The Caretaker's project, with this month's Stage 1 release looping various scenes from America around the 1950s. During that decade (and I will return to these topics):