Skip to content

Instantly share code, notes, and snippets.

Sergio Garcia Mondaray sgmonda

Block or report user

Report or block sgmonda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sgmonda
sgmonda / promiseRunnerExample.js
Last active Jan 31, 2020
Promise runner example for sgmonda.com
View promiseRunnerExample.js
// Usage: $ node promiseRunnerExample.js <mode>
// Where <mode> can be one of the following: 'serie', 'parallel', 'parallelLimit'
const numbers = Array(50).fill(1).map((_, index) => index);
const getNumber = (num) => new Promise((resolve) => {
const delay = Math.random() * 1000;
const fun = () => resolve(num);
setTimeout(() => {
process.stdout.write(`${num}, `);
@sgmonda
sgmonda / code-print.tex
Last active Jun 9, 2019
Simple LaTeX template to print beautiful black&white Javascript source code
View code-print.tex
\documentclass[a4paper, 12pt]{article}
\usepackage[letterpaper, margin=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{beramono}
\usepackage{listings}
\usepackage{xcolor}
\newcommand\realnumberstyle[1]{}
You can’t perform that action at this time.