This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createMuiTheme } from "@material-ui/core"; | |
/* | |
Generates a random theme for Material-UI. Usually horrible. | |
*/ | |
const randomColor = () => { | |
return ["#",Math.floor((Math.random()*16)).toString(16),Math.floor((Math.random()*16)).toString(16),Math.floor((Math.random()*16)).toString(16),Math.floor((Math.random()*16)).toString(16),Math.floor((Math.random()*16)).toString(16),Math.floor((Math.random()*16)).toString(16)].join(""); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on @sandyjmacdonald's original gist: | |
# https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 | |
import time | |
import board | |
import busio | |
import usb_hid | |
from adafruit_bus_device.i2c_device import I2CDevice | |
import adafruit_dotstar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// James Cheese 2021 - based on example at https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode | |
// Build an audio context of whatever type's available | |
let SupportedAudioContext = null; | |
if (window.AudioContext !== undefined) { | |
SupportedAudioContext = window.AudioContext; | |
} else if (window.webkitAudioContext !== undefined) { | |
SupportedAudioContext = window.webkitAudioContext; | |
} | |
const silentAudioContext = new SupportedAudioContext(); |
OlderNewer