Skip to content

Instantly share code, notes, and snippets.

View RecuencoJones's full-sized avatar
👨‍💻
JavaScript Developer @ adidas

David Recuenco RecuencoJones

👨‍💻
JavaScript Developer @ adidas
View GitHub Profile
@RecuencoJones
RecuencoJones / list.js
Last active August 29, 2015 14:23
Calcular el producto de todos los pares mayores que 5 sin incluir el número par más grande
/*
* Calcular el producto de todos los pares mayores que 5 sin
* incluir el número par más grande
*/
var l1 = [1,8,2,15,6,7,8,12]; //384
var l2 = [12,8,2,15,6,7,8,12]; //384
var l3 = [1,8,2,15,6,7,8,12,12]; //384
var l4 = [1,8,2,15,12,6,7,8,12]; //384
var l5 = [12,8,7,6,15,2,8,1]; //384
@RecuencoJones
RecuencoJones / Dockerfile
Created November 10, 2017 08:57
npm@5 file dependency resolutions
FROM node:8
COPY package-a.json /test/package-a/package.json
COPY package-b.json /test/package-b/package.json
COPY entrypoint.sh /test/entrypoint.sh
ENTRYPOINT ["/test/entrypoint.sh"]
@RecuencoJones
RecuencoJones / Dockerfile
Created November 10, 2017 09:07
npm@4 file dependency resolutions
FROM node:7
COPY package-a.json /test/package-a/package.json
COPY package-b.json /test/package-b/package.json
COPY entrypoint.sh /test/entrypoint.sh
ENTRYPOINT ["/test/entrypoint.sh"]

Keybase proof

I hereby claim:

  • I am recuencojones on github.
  • I am recuencojones (https://keybase.io/recuencojones) on keybase.
  • I have a public key ASDwYgU_tjiwdFeDtaT44UTZLbW6n0U_iClNFFGymtvP3Ao

To claim this, I am signing this object:

@RecuencoJones
RecuencoJones / npmrc
Created April 4, 2018 08:53
Simple bash based .npmrc manager (wip)
#!/bin/bash -l
version=0.1.0
editor=${NPMRC_EDITOR:-vim}
npmrc_dir=${NPMRC_DIR:-"~"}
npmrc_filename=.npmrc
# list available npmrc profiles
function listProfiles() {
local home_path=`echo ~`
@RecuencoJones
RecuencoJones / pagination-blocking.js
Last active November 1, 2018 22:10
RxJS pagination
const { create, of, fromPromise } = Rx.Observable
////// main //////
const charactersUrl = 'https://swapi.co/api/people'
const getAllCharacters = () => getPagedResource(charactersUrl)
// outputs all characters at once
getAllCharacters()
.subscribe((vals) => {
@RecuencoJones
RecuencoJones / workerpool-swapi.js
Last active November 3, 2018 14:53
Use a workerpool to consume SWAPI with RxJS
const { pool } = require('workerpool')
const { Observable } = require('rxjs')
require('rxjs/add/observable/fromPromise')
require('rxjs/add/observable/empty')
require('rxjs/add/observable/forkJoin')
require('rxjs/add/operator/expand')
const { fromPromise, empty, forkJoin } = Observable
const start = 'https://swapi.co/api/people'
const min = (...args) => args.reduce((min, next) => min < next ? min : next, Infinity)
min() === Infinity
min(2) === 2
min(5, -3, 0) === 0
@RecuencoJones
RecuencoJones / TextField.tsx
Last active June 28, 2019 14:37
Framer X Stencil integration
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
import { defineCustomElements } from "stencil-component/dist/loader";
const style: React.CSSProperties = {
height: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
textAlign: "center",
@RecuencoJones
RecuencoJones / launch.json
Created August 23, 2019 06:26
Debugging TypeScript source and test files
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",