Skip to content

Instantly share code, notes, and snippets.

import math
def minimax(resultList):
results = resultList[len(resultList) - 1]
if len(results) == 1:
return results[0], resultList
depth = math.log2(len(results))
newResults = []
for i in range(0, len(results), 2):
a, b = results[i], results[i + 1]
@Tracer1337
Tracer1337 / autoreload.js
Created July 3, 2023 08:27
Reload a website periodically
// Copy-Paste this code into the browser console
//
// Execute with:
//
// autoReload()
//
// Or with a custom config:
//
// autoReload({ reloadInterval: 20 })
@Tracer1337
Tracer1337 / palette.js
Created July 17, 2023 12:56
Visualize theme palette in jsfiddle
const colors = {
green: {
100: '#00ff00',
},
}
Object.entries(colors).map(([color, shades]) =>
Object.entries(shades).map(([shade, colorCode]) => renderShade(color, shade, colorCode))
)