Skip to content

Instantly share code, notes, and snippets.

View gillkyle's full-sized avatar
🐛
releasing more bugs into the wild

Kyle Gill gillkyle

🐛
releasing more bugs into the wild
View GitHub Profile
@gillkyle
gillkyle / voltorbflip.com
Created December 29, 2021 20:13
Helpers for entering stuff into voltorbflip.com
// copy paste this into the console of Voltorbflip.com to make it easier to input numbers
function findAndFocus(id) {
document.getElementById(id).focus();
}
function clearInputs() {
document.querySelectorAll("input").forEach(input => {
input.value = ""
})
}
function handleChange(e) {
function normalizeColor(e){return[(e>>16&255)/255,(e>>8&255)/255,(255&e)/255]}["SCREEN","LINEAR_LIGHT"].reduce(((e,t,n)=>Object.assign(e,{[t]:n})),{});class MiniGl{constructor(e,t,n,i=!1){const s=this,o=-1!==document.location.search.toLowerCase().indexOf("debug=webgl");s.canvas=e,s.gl=s.canvas.getContext("webgl",{antialias:!0}),s.meshes=[];const r=s.gl;t&&n&&this.setSize(t,n),s.lastDebugMsg,s.debug=i&&o?function(e){const t=new Date;t-s.lastDebugMsg>1e3&&console.log("---"),console.log(t.toLocaleTimeString()+Array(Math.max(0,32-e.length)).join(" ")+e+": ",...Array.from(arguments).slice(1)),s.lastDebugMsg=t}:()=>{},Object.defineProperties(s,{Material:{enumerable:!1,value:class{constructor(e,t,n={}){function i(e,t){const n=r.createShader(e);return r.shaderSource(n,t),r.compileShader(n),r.getShaderParameter(n,r.COMPILE_STATUS)||console.error(r.getShaderInfoLog(n)),s.debug("Material.compileShaderSource",{source:t}),n}function o(e,t){return Object.entries(e).map((([e,n])=>n.getDeclaration(e,t))).join("\n")}this.unif
function normalizeColor(hexCode) {
return [
((hexCode >> 16) & 255) / 255,
((hexCode >> 8) & 255) / 255,
(255 & hexCode) / 255
];
}
["SCREEN", "LINEAR_LIGHT"].reduce(
(hexCode, t, n) => Object.assign(hexCode, { [t]: n }),
{}
@gillkyle
gillkyle / google-taxonomy.json
Created June 28, 2023 17:18
Google's Product taxonomy used in classifying products for sale as a JSON file instead of a .txt file.
{
"id": "root",
"children": [
{
"id": "Animals & Pet Supplies",
"children": [
{ "id": "Live Animals", "children": [] },
{
"id": "Pet Supplies",
"children": [
/* initially hide all banners except the first one */
.notice-banner {
display: none;
}
/* show the first banner that is not dismissed */
.notice-banner:not([data-dismissed='true']):first-of-type {
display: flex;
}