Skip to content

Instantly share code, notes, and snippets.

View LewisAlderman's full-sized avatar

Lewis LewisAlderman

View GitHub Profile
@LewisAlderman
LewisAlderman / update-patch-version.sh
Last active June 27, 2023 15:11
Update EAS (Expo) package/build versioning prior to release
#!/bin/bash
# Move to the root directory of the project
# cd ..
# Define the function to increment the patch version
increment_patch_version () {
version=$1
if [[ $version == *"."*"."* ]]; then
major=$(echo $version | cut -d. -f1)
@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
*/
@LewisAlderman
LewisAlderman / tailwind.config.js
Created March 9, 2022 13:09
Adding `:not()` selector-modifiers to TailwindCSS
// ...
const plugin = require('tailwindcss/plugin')
/**
* @type {import('tailwindcss/tailwind-config').TailwindConfig}
*/
module.exports = {
// ...
plugins: [
// ...,
@LewisAlderman
LewisAlderman / bookmark.min.js
Last active May 12, 2018 15:43
Simple CSS Debugger
if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(path):not(g) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.15rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger();