Skip to content

Instantly share code, notes, and snippets.

View LewisAlderman's full-sized avatar

Lewis LewisAlderman

View GitHub Profile
@LewisAlderman
LewisAlderman / autolights.sh
Last active October 31, 2022 19:20 — forked from jptoto/gist:3b2197dd652ef13bd7f3cab0f2152b19
Catch camera event
#!/bin/bash
# Begin looking at the system log via the steam sub-command. Using a --predicate and filtering by the correct and pull out the camera event
log stream --predicate 'subsystem == "com.apple.UVCExtension" and composedMessage contains "Post PowerLog"' | while read line; do
# The camera start event has been caught and is set to 'On', turn the light on
if echo "$line" | grep -q "= On"; then
echo "Camera has been activated, turn on the light."
@LewisAlderman
LewisAlderman / Gradient.js
Created September 25, 2022 13:40 — forked from jordienr/Gradient.js
Stripe Mesh Gradient WebGL
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/