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 / pulseSensor.ino
Created April 14, 2016 02:23
Pulse Sensor Arduino Sketch
volatile unsigned long count = 0;
unsigned long oldcount = 0;
unsigned long last;
unsigned long freq = 0;
void irq1()
{
count++;
}
/*
Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
*/
/**
* Example for Getting Started with nRF24L01+ radios.
digraph G {
clusterrank=global;
fontname="Helvetica";
rankdir="TB";
newrank=true;
node [shape=box];
subgraph cluster1 {
label="1 Systems Engineering";
@ethanjli
ethanjli / flotsam.md
Last active April 12, 2022 22:35
"flotsam" Review

In January 1992, twelve containers fell off a cargo ship into the North Pacific, with one container spilling 28,800 rubber ducks and bath toys being shipped for sale in the US. They were made famous by oceanographer Curtis Ebbesmeyer, who repurposed them along with other flotsam (such as a container-full of Nike shoes which were spilled in 1990) into ad hoc Lagrangian drifters for characterizing and monitoring ocean currents:

image

Many of these plastic animals remain in the Great Pacific garbage patch, which is a gyre in the North Pacific Ocean estimated to contain six pounds of plastic - mostly microplastics - for every pound of plankton. These microscopic particles come from a variety of sources, including industrial production of microplastics and subsequent release into waterways; the break

@ethanjli
ethanjli / palaces.md
Last active September 6, 2022 04:55
"Palaces" Review

(this review contains major spoilers for Ray's Palaces, thatgamecompany's Journey, Adam Robinson-Yu's A Short Hike, and Branches's Mount Eerie)

Ray's Palaces is a striking track for me because of what its ending does with the track's arduous climb up the side of a mountain. After a slow grind up characterized by struggling and halting motion and by bouts of falling down and then crawling back up, a tumbling Bosh loses their sled and collapses face-up on a summit marked by a tattered flag. The track ends with the camera zooming out to reveal that our summit isn't actually the mountaintop - that Bosh, unable or unwilling to get up and keep going, is staring up the side of an even taller peak right in front of them. Oof. How do we make sense of what this track does here?

I think there are many meaningful and interesting ways to understand this (for example, if the tattered flag at the end

@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):

@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 / 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 / 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 / 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