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
let tiles = document.body.querySelectorAll('.product-tile--paint'); | |
let colors = []; | |
var matchRGB = /rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/; | |
function rgbToHex(r, g, b) { | |
return '#' + ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1); | |
} | |
Array.from(tiles).forEach((tile) => { |
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
const encodeNumbers = (array) => { | |
const chunk = (arr, len) => { | |
var chunks = [], | |
i = 0, | |
n = arr.length; | |
while (i < n) { | |
chunks.push(arr.slice(i, i += len)); | |
} | |
return chunks | |
} |
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
I am attesting that this GitHub handle pouretrebelle is linked to the Tezos account tz2Ja8LwHuzSLP7NdxH2fpRL16og2H21owR8 for tzprofiles | |
sig:spsig1Mw9UEuP4L2dyPxdsuK4A3FZDThFSZh9mxX7u2rDQR7wKx1t7yesDVpQ6X4Qcivi8vhWoYPbm7DM2bJXeG8whnP8KanZwx |
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
const fs = require('fs') | |
const { Octokit } = require('@octokit/core') | |
const prettier = require('prettier') | |
const defaultPrettierConfig = require('../.prettierrc') | |
const prettierConfig = { | |
...defaultPrettierConfig, | |
parser: 'markdown', | |
} |
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
class Vector2 { | |
constructor(x, y) { | |
this.x = x || 0; | |
this.y = y || 0; | |
} | |
reset(x, y) { | |
this.x = x; | |
this.y = y; | |
return this; |
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
// Painting things | |
//================ | |
int screenWidth = 1800; | |
int screenHeight = 1800; | |
int predraw = 1000; // frames per paint | |
Dot[] dots = new Dot[10]; // amount of paints | |
int iteration = 1; // name of saved png | |
boolean saving = false; // save to png | |
float framesPerSec = 1; // frame rate |
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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
$themes: ("a": #ffcc00, "b": #00ddee) | |
=theme-color($prop: color) | |
@each $theme, $color in $themes | |
.theme--#{$theme} & |