Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jshaw's full-sized avatar
🤖
👨‍🎨 👨‍💻

Jordan Shaw jshaw

🤖
👨‍🎨 👨‍💻
View GitHub Profile
@jshaw
jshaw / lightbar.ino
Created November 6, 2023 14:44 — forked from hsiboy/lightbar.ino
WS2811 - lightbar - FastLED
// From Mark Kriegsman's Anti-aliased light bar example: http://pastebin.com/g8Bxi6zW
#include <FastLED.h>
#define LED_PIN 13 // hardware SPI pin SCK
#define NUM_LEDS 250
#define COLOR_ORDER RGB
#define LED_TYPE WS2811
#define MAX_BRIGHTNESS 255 // watch the power!
@jshaw
jshaw / MarqueeOverlay.ino
Created November 6, 2023 06:03 — forked from kriegsman/MarqueeOverlay.ino
MarqueeOverlay - render marquee-like effects on segments of a display (for YUM cart, Burning Man 2015)
#include "FastLED.h"
// MarqueeOverlay
//
// Code to overlay a 'marquee' effect on top
// of other animations, e.g. to highlight individual
// letters of a sign one after another, while
// still allowing the underlying animations to show through.
//
// Initially designed for the "YUM cart" for Burning Man 2015.
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#define USE_OCTOWS2811
#include <OctoWS2811.h>
#include <FastLED.h>
// enter desired universe and subnet (sACN first universe is 1)
#define DMX_SUBNET 0
#define DMX_UNIVERSE 1 //**Start** universe
@jshaw
jshaw / product-variant-list.liquid
Last active September 11, 2023 17:37
Using metafields and collections for custom product varients when using unique products, not default product varient behaviour.
<!-- Using metafields and collections for custom product varients when using unique products, not default product varient behaviour. -->
{% liquid
assign product_variants = product.metafields.custom.product_variant_collection.value.products
%}
{% for variant in product_variants %}
<!-- so we don't show the current product in the varient list, we do a quick compaire between the current product we are on the PDP and the varient ID in the loop -->
{% if product.id != variant.id %}
<li class="product-details__panel-variant-item">
@jshaw
jshaw / circlesofdots.pde
Created March 3, 2023 20:34 — forked from marcedwards/circlesofdots.pde
Circles of dots in Processing
//
// Circles of dots.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
// A GIF of this code can be seen here:
// https://twitter.com/marcedwards/status/1144236924095234053
//
@jshaw
jshaw / clock.pde
Created February 17, 2023 17:42 — forked from companje/clock.pde
Arc Clock in Processing
float heleCirkel = TWO_PI; //tau
void setup() {
size(500,500);
background(0);
smooth();
}
void draw() {
background(0);
@jshaw
jshaw / Gradient.js
Created December 13, 2022 16:28 — 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
*/
@jshaw
jshaw / greyscale.frag
Created June 22, 2022 16:21 — forked from Volcanoscar/greyscale.frag
A simple glsl color -> greyscale shader, using luminosity method
// fragment shader
//
// RGBA color to RGBA greyscale
//
// smooth transition based on u_colorFactor: 0.0 = original, 1.0 = greyscale
//
// http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
// "The luminosity method is a more sophisticated version of the average method.
// It also averages the values, but it forms a weighted average to account for human perception.
// We’re more sensitive to green than other colors, so green is weighted most heavily. The formula
@jshaw
jshaw / angle-between-points.js
Created March 11, 2022 23:21 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@jshaw
jshaw / tableSizeChart.html
Created February 4, 2022 03:22
Table Size Chart
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-baqh{text-align:center;vertical-align:top}
</style>
<table class="tg">
<thead>