Skip to content

Instantly share code, notes, and snippets.

based in amsterdam

Herlon Aguiar herlon214

based in amsterdam
Block or report user

Report or block herlon214

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
herlon214 / fibo.go
Created Jul 20, 2019
GoLang Fibonacci with cache
View fibo.go
package pkg
import (
var cache = make(map[int]*big.Int, 0)
// Fibo calc
func Fibo(n int) *big.Int {
View identicon.ex
defmodule Identicon do
def main(input) do
|> create_image_from_input
|> pick_color
|> build_grid
|> filter_odd_squares
|> build_pixel_map
|> draw_image
herlon214 / init
Created Jan 18, 2019
Bash to work with gdsm
View init
export $(curl
docker swarm leave
docker swarm join --token TOKEN GDSM_IP:2377
NODE=$(docker info --format '{{ .Swarm.NodeID}}')
curl http://GDSM_IP:3300/label -X POST -d $(printf '{"ServiceName":"%s","NodeID":"%s"}' $SERVICE $NODE) -H "Content-Type: application/json"
herlon214 / init.service
Created Jan 18, 2019
Service starts after docker
View init.service
Description=Initialize docker
ExecStart=/bin/bash /home/core/init
ExecReload=/bin/bash /home/core/init
ExecStop=/bin/bash /home/core/init
herlon214 / Dockerfile
Created Dec 7, 2018
Compile and build NodeJS
View Dockerfile
# Build
FROM node:8.10.0 as builder
ENV NODE_ENV development
COPY [".", "./"]
RUN yarn install --production=false && yarn compile
# Run
FROM node:8.10.0
View jest_with_parcel.txt
// babel.rc
"presets": [
// package.json
"dependencies": {
echo 'feature/testingGDSC' | sed -e 's/\//-/g'
herlon214 / Go build with docker
Created May 19, 2018
Build a go project within a Docker container
View Go build with docker
docker run --rm -v ${PWD}:/go/src/ -w /go/src/ golang:latest /bin/bash -c "go get -v && go build -v -o /go/src/"
View NPM fix docker

Fix npm docker permissions

Add this line into your Dockerfile

RUN npm config set unsafe-perm=true

herlon214 / Dockerfile
Created Mar 29, 2018 — forked from nknapp/Dockerfile
Traefik setup as reverse-proxy with docker and letsencrypt
View Dockerfile
FROM traefik:camembert
ADD traefik.toml .
You can’t perform that action at this time.