Skip to content

Instantly share code, notes, and snippets.

View alarrosa14's full-sized avatar

Alvaro Larrosa alarrosa14

View GitHub Profile
@maruware
maruware / Link.tsx
Last active June 14, 2023 02:51
custom Link component with material-ui + react-router-dom on TypeScript
@alarrosa14
alarrosa14 / local-mongo-replicaset-with-docker
Created March 14, 2019 20:56 — forked from simon-contreras-deel/local-mongo-replicaset-with-docker
Local mongo replicaset with docker #docker #mongo
# pull the official mongo docker container
docker pull mongo
# create network
docker network create my-mongo-cluster
# create mongos
docker run -d --net my-mongo-cluster -p 27017:27017 --name mongo1 mongo mongod --replSet my-mongo-set --port 27017
docker run -d --net my-mongo-cluster -p 27018:27018 --name mongo2 mongo mongod --replSet my-mongo-set --port 27018
docker run -d --net my-mongo-cluster -p 27019:27019 --name mongo3 mongo mongod --replSet my-mongo-set --port 27019
@Ad115
Ad115 / tree_reduce.py
Created October 15, 2019 19:52
A generic tree reduce algorithm in Python
"""
Generic recursive tree reduce algorithm
=======================================
Trees are one of the most ubiquitous data structures. It is amazing how often we
as programmers tend to reimplement the same algorithms for different trees.
This module defines a generic tree-reduce algorithms that can be
used with any tree-like object such as filesystem paths, lists, nested
dictionaries an expression tree or even specialized tree classes! The only thing