Skip to content

Instantly share code, notes, and snippets.

View alexrios's full-sized avatar
🦎
Zigging around

Alex Rios alexrios

🦎
Zigging around
View GitHub Profile
-Xms1024m
-Xmx4096m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
@alexrios
alexrios / .tmux.conf
Last active July 18, 2022 17:50
Turn on mouse interaction with Byobu (~/.byobu/.tmux.conf )
set -g mouse on
set -g mouse-select-pane on
set -g mouse-select-window on
set -g mouse-resize-pane on
set -g mouse-utf8 on
@alexrios
alexrios / _service.md
Created June 18, 2018 18:34 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@alexrios
alexrios / NanoRedux.js
Created September 18, 2018 14:49
A menor versao possivel do redux
function createStore(reducer) {
let state
let listeners = []
const getState = () => state
const subscribe = (listener) => {
listeners.push(listener)
return () => {
listeners = listeners.filter((l) => l !== listener)

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from Feb

@alexrios
alexrios / gcloud-install.sh
Last active December 28, 2018 19:31
./gcloud-install <version> (default is 228.0.0)
#!/bin/bash
SPECIFIED_VERSION=$1
DEFAULT_VERSION=228.0.0
GCLOUD_VERSION=${SPECIFIED_VERSION:-$DEFAULT_VERSION}
echo "Installing GCLOUD version ${GCLOUD_VERSION}"
UPSTREAM=https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${GCLOUD_VERSION}-linux-x86_64.tar.gz
GCLOUD_PATH=~/gcloud
DOWNLOAD_PATH=/tmp
@alexrios
alexrios / commizten-install.sh
Created January 22, 2019 16:23
Commitzen installer
#!/bin/bash
npm install -g commitizen && \
npm install -g cz-conventional-changelog && \
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
@alexrios
alexrios / update_go_version.sh
Last active March 20, 2019 14:09
Update go version
#!/bin/bash
SPECIFIED_VERSION=$1
DEFAULT_VERSION=1.12.1
GO_VERSION=${SPECIFIED_VERSION:-$DEFAULT_VERSION}
echo "Installing Golang version ${GO_VERSION}"
DOWNLOAD_PATH=/tmp
GO_PACKAGE=go${GO_VERSION}.linux-amd64.tar.gz
UPSTREAM=https://dl.google.com/go/$GO_PACKAGE
@alexrios
alexrios / Dockerfile
Created March 27, 2019 01:42
Safe Multistage build for Golang
# Versão do go que sera utilizada
# Default to Go 1.11
ARG GO_VERSION=1.11
# Criando executavel
FROM golang:${GO_VERSION}-alpine AS builder
#Cria o usuario e grupo que serao usados no container sendo executado para
#rodar o processo como um usuario sem privilegio.
#https://sobrelinux.info/questions/913/what-is-the-purpose-of-the-nobody-user
@alexrios
alexrios / bitbucket-pipelines.yml
Created April 30, 2019 16:25
Deploy static site to AWS S3 via Bitbucket pipelines
definitions:
steps:
- step: &S3-deploy-stg
#more info: bitbucket.org/atlassian/aws-s3-deploy
name: Deploy to staging
deployment: staging
script:
- pipe: atlassian/aws-s3-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID