Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
👨‍🎨 👨‍💻

Jordan Shaw jshaw

🤖
👨‍🎨 👨‍💻
View GitHub Profile
@jshaw
jshaw / byobuCommands
Last active May 7, 2023 15:50
Byobu Commands
View byobuCommands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@jshaw
jshaw / circlesofdots.pde
Created March 3, 2023 20:34 — forked from marcedwards/circlesofdots.pde
Circles of dots in Processing
View circlesofdots.pde
//
// 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
View clock.pde
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
View Gradient.js
/*
* 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 / aframe-autoplay-video-on-mobile.js
Created October 25, 2017 20:08 — forked from cvan/aframe-autoplay-video-on-mobile.js
handle autoplay of <video> in A-Frame on mobile (iOS, Android) - see https://github.com/aframevr/aframe/pull/2657/files
View aframe-autoplay-video-on-mobile.js
function playVideoOnClick (selector) {
el = document.querySelector(selector);
if (el) {
addListener();
} else {
window.addEventListener('load', addListener);
}
function addListener () {
@jshaw
jshaw / greyscale.frag
Created June 22, 2022 16:21 — forked from Volcanoscar/greyscale.frag
A simple glsl color -> greyscale shader, using luminosity method
View greyscale.frag
// 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 / FBShareExample
Last active June 3, 2022 14:18
Basic FB Share link example that allows custom image url and description for dynamic content. This content would be available in the JS somewhere... like the context.
View FBShareExample
Core.prototype._initializeFbShare = function() {
$('#Fb-share').on('click', _(this._handleFbShare).bind(this));
};
Core.prototype._handleFbShare = function(event) {
event.preventDefault();
var image_url = this.getPaletteImageUrl(this.picker.config.shade_array);
var palette_name = this.$inputPalName.val();
var lang = document.documentElement.lang;
@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
View angle-between-points.js
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@jshaw
jshaw / index.html
Created February 20, 2015 21:56
Google Streetview Example
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Custom Street View panorama tiles</title>
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
@jshaw
jshaw / tableSizeChart.html
Created February 4, 2022 03:22
Table Size Chart
View tableSizeChart.html
<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>