Skip to content

Instantly share code, notes, and snippets.

View alancampora's full-sized avatar
🔥
always coding

Alan Campora alancampora

🔥
always coding
  • Bs As
View GitHub Profile
const compose = (...fns) =>
fns.reduce((prev, current) => data => prev(current(data)), x => x);
/*
*const map = (fnx, arr) => {
* return arr.reduce((acum, current) => {
* acum.push(fnx(current));
* return acum;
* }, []);
*};
@alancampora
alancampora / System Design.md
Created February 10, 2018 04:22 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@alancampora
alancampora / Transformador.js
Created December 7, 2017 01:10
QDD - Transformador 1
//function obtenerPorcentajeGastado(gastado, ahorro) {
//let porcentaje = gastado * 100 / ahorro,
//porcentajeConSimbolo = porcentaje + '%';
//return porcentajeConSimbolo;
//}
//console.log(obtenerPorcentajeGastado(10, 100)); // 10%
class Ahorro {
@alancampora
alancampora / rulething.html
Created September 13, 2016 22:51 — forked from mpj/rulething.html
Code from episode
<html>
<head>
<style>
.row div {
height: 8px;
display: inline-block;
width: 8px;
}
.row div.active {
background-color: red;