Skip to content

Instantly share code, notes, and snippets.

View jaschaio's full-sized avatar
💪
Productive

Jascha Brinkmann jaschaio

💪
Productive
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="Starter Snowpack App" />
<title>Starter Snowpack App</title>
<script type='module' src="/index.js"></script>
</head>
<body>
@jaschaio
jaschaio / bullmq.js
Created June 9, 2020 20:14
Bullmq Test
const cluster = require( 'cluster' );
const { Queue, Worker } = require( 'bullmq' );
if ( cluster.isMaster ) {
var hrstart;
for ( let i = 0; i++ < 4; ) {
let worker = cluster.fork();
@jaschaio
jaschaio / bull.js
Last active June 9, 2020 20:14
Bull Test
const cluster = require( 'cluster' );
const Bull = require( 'bull' );
if ( cluster.isMaster ) {
var hrstart;
for ( let i = 0; i++ < 4; ) {
let worker = cluster.fork();
@jaschaio
jaschaio / promises.md
Last active June 20, 2018 14:53
Chris Ferdinandi Promises

How do I execute something after all promises within a loop have resolved?

Example code:

// ... url, headers, parameters for the requests

// Item we are iterating over and we actually use within the requests
var example = {
  'Weekly',