Skip to content

Instantly share code, notes, and snippets.

View amejiarosario's full-sized avatar
🎯
Think big, start small, learn fast!

Adrian Mejia amejiarosario

🎯
Think big, start small, learn fast!
View GitHub Profile
/**
* Get the smallest number on an array of numbers
* @param {Array} n array of numbers
*/
function getMin(n) {
const array = Array.from(n);
let min;
array.forEach(element => {
if(min === undefined || element < min) {
@amejiarosario
amejiarosario / aesop.txt
Created June 27, 2018 17:07
Aesop's Fable
long ago , the mice had a general council to consider what measures they could take to outwit their common enemy , the cat . some said this , and some said that but at last a young mouse got up and said he had a proposal to make , which he thought would meet the case . you will all agree , said he , that our chief danger consists in the sly and treacherous manner in which the enemy approaches us . now , if we could receive some signal of her approach , we could easily escape from her . i venture , therefore , to propose that a small bell be procured , and attached by a ribbon round the neck of the cat . by this means we should always know when she was about , and could easily retire while she was in the neighbourhood . this proposal met with general applause , until an old mouse got up and said that is all very well , but who is to bell the cat ? the mice looked at one another and nobody spoke . then the old mouse said it is easy to propose impossible remedies .
Verifying my Blockstack ID is secured with the address 1JDkHwsdv8co3iGA6TB5TcFwvydb2H2qe2 https://explorer.blockstack.org/address/1JDkHwsdv8co3iGA6TB5TcFwvydb2H2qe2
@amejiarosario
amejiarosario / .block
Last active April 13, 2017 20:40 — forked from mbostock/.block
Force-Directed Web Worker
license: gpl-3.0
height: 960
@amejiarosario
amejiarosario / .block
Last active April 10, 2017 20:35 — forked from steveharoz/.block
d3-force testing ground
license: gpl-3.0
height: 1030
scrolling: yes
@amejiarosario
amejiarosario / .block
Created November 9, 2016 22:00 — forked from mbostock/.block
Molecule
license: gpl-3.0
@amejiarosario
amejiarosario / .block
Created November 8, 2016 19:18 — forked from mbostock/.block
Blocks Graph
license: gpl-3.0
height: 960
@amejiarosario
amejiarosario / .block
Created October 21, 2016 20:18
Force Graph
license: gpl-3.0
@amejiarosario
amejiarosario / static_server.js
Created August 24, 2016 21:49
Node.js quick file server (static files over HTTP) using es6+
const http = require('http');
const url = require('url');
const fs = require('fs');
const path = require('path');
const port = process.argv[2] || 9000;
http.createServer(function (req, res) {
console.log(`${req.method} ${req.url}`);
// parse URL
@amejiarosario
amejiarosario / npm_modules.md
Last active June 9, 2016 15:50
Technology Tracking/Trends