Skip to content

Instantly share code, notes, and snippets.

View dkarbayev's full-sized avatar
🏠
Working from home

Dan Karbayev dkarbayev

🏠
Working from home
  • Army of One
  • Your Neighbourhood
View GitHub Profile
package main
import (
"fmt"
)
// tl = top left
// tr = top right
// bl = bottom left
// br = bottom right
@dkarbayev
dkarbayev / bounded_goroutines.go
Created January 6, 2019 12:13
Limit the number of concurrently running goroutines
package main
import (
"fmt"
"math/rand"
"sync"
"time"
)
func main() {
global.THREE = require("three");
const canvasSketch = require('canvas-sketch');
const Random = require('canvas-sketch-util/random');
const gradientHeight = 512;
const settings = {
dimensions: [ 2048, gradientHeight * 2 ]
};