Skip to content

Instantly share code, notes, and snippets.

Avatar
💪
Productive

jaschaio

💪
Productive
View GitHub Profile
View index.html
<!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>
View bullmq.js
const cluster = require( 'cluster' );
const { Queue, Worker } = require( 'bullmq' );
if ( cluster.isMaster ) {
var hrstart;
for ( let i = 0; i++ < 4; ) {
let worker = cluster.fork();
View bull.js
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 Jun 20, 2018
Chris Ferdinandi Promises
View promises.md

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',