Skip to content

Instantly share code, notes, and snippets.

View mlajtos's full-sized avatar

Milan Lajtoš mlajtos

View GitHub Profile
@mlajtos
mlajtos / artbreeder-interpolation.js
Created March 27, 2021 09:18
Artbreeder Interpolation
// Automating Artbreeder Interpolation
// https://www.youtube.com/watch?v=Dhj59I6sus4
function range(start = 0, end = 1, num = 3) {
return Array(num)
.fill(null)
.map((v, i) => start + (i * (end - start)) / (num - 1));
}
function interpolateGene(gene = "mouthopen", values = range(-1, 1, 30)) {
@mlajtos
mlajtos / loc-stats.sh
Created April 8, 2019 17:38
Lines Of Code – Statistics
git ls-files | grep "src/.*\.js\$" | xargs -n1 git blame --line-porcelain | grep "author " | sed -n 's/author //p' | sort -f | uniq -ic | sort -nr
@mlajtos
mlajtos / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../ace-element/ace-element.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@mlajtos
mlajtos / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../code-mirror/code-mirror.html">
<link rel="import" href="../core-splitter/core-splitter.html">
<polymer-element name="my-element">
<template>
<style>