Skip to content

Instantly share code, notes, and snippets.

View brauliodiez's full-sized avatar

Braulio Diez brauliodiez

View GitHub Profile
@brauliodiez
brauliodiez / PodsProposal.MD
Last active August 26, 2018 16:27
Pods proposal

Pods proposal

Draft Pods proposal for the Chat solution, topics to discuss:

  • Likely lobby and chat components should be in the same pods.
  • This would just to show how to isolate in pods (core will hold session-info reducer).

Option A)

├───common-app
@brauliodiez
brauliodiez / swaggernotes.md
Last active January 4, 2019 12:13
Notes about swagger

Installing swagger globally

npm install -g swagger

Create a new swagger project

swagger project create 
@brauliodiez
brauliodiez / generators.md
Last active January 23, 2019 18:16
Notas del training de generadores (Español)

Conceptos básicos

En javascript cuando llamamos a una función esta se ejecuta de inicio a final.

function logger() {
console.log('Start');
console.log('End');
}
class Pedido {
constructor() {
this.descuento = 0.90;
this.venta = 100;
}
aplicaDescuento() {
debugger;
console.log(this.venta);
var self = this;
@brauliodiez
brauliodiez / Readme.md
Last active March 10, 2020 16:35
Para poner un pin centrado en cada comunidad autónoma en una mapa de españa, esto es útil para poder usarlo con por ejemplo d3js

Comunidades autonomas - Marcadores centrados

Listado de latitud y longitud, marcadores centrados por cada comunidad autónoma (España).

Posibles utilidades: mapas que montes con d3js.

Ejemplo de uso: https://codesandbox.io/s/hopeful-ellis-rlczx

@brauliodiez
brauliodiez / readme.md
Created June 4, 2017 09:12
javascript currying

Currying

Currying is the act of turning a function into a new function that takes slightly fewer arguments, achieving a slightly more specific task.

http://macr.ae/article/es6-and-currying.html

Steps

Let's start by making a simple function that will sum up two numbers, using currying:

@brauliodiez
brauliodiez / readme.md
Last active September 1, 2023 04:48
lodash/fp set and flow

lodash/fp - set / flow

In this gist we are going to learn about basic goodies that we get from the library lodash/fp (fp stands for functional programming, great for ensuring immutability).We'll learn just by doing (step by step guided sample + codepens).

We'll cover lodash set and flow functions

Steps

  • We'll use codepen as our playground, navigate to this page: