Skip to content

Instantly share code, notes, and snippets.

View maestre3d's full-sized avatar
🌟
The star that burns twice as bright burns half as long

A. Ruiz maestre3d

🌟
The star that burns twice as bright burns half as long
View GitHub Profile
@maestre3d
maestre3d / gist:4fc574903cc348b8f7729d17b35873cb
Created May 6, 2019 19:40 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@maestre3d
maestre3d / elb-nodejs-ws.md
Created November 22, 2019 05:52 — forked from obolton/elb-nodejs-ws.md
Configuring an AWS Elastic Load Balancer for a Node.js application using WebSockets on EC2

AWS ELB with Node.js and WebSockets

This assumes that:

  • You are using Nginx.
  • You want to accept incoming connections on port 80.
  • Your Node.js app is listening on port 3000.
  • You want to be able to connect to your Node.js instance directly as well as via the load balancer.

####1. Create load balancer

@maestre3d
maestre3d / pagination.go
Last active November 23, 2021 00:36
Index-based SQL pagination
package foo
import (
"context"
"net/http"
"strconv"
)
// PaginateParams Paginate required params
type PaginateParams struct {
@maestre3d
maestre3d / installing-postman.md
Created July 3, 2020 02:46 — forked from ba11b0y/installing-postman.md
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@maestre3d
maestre3d / sse.go
Created July 25, 2020 17:15
Server Sent Events (SSE) broker written in Go
package sse
import (
"encoding/json"
"fmt"
"github.com/alexandria-oss/core"
"github.com/go-kit/kit/log"
"net/http"
"sync"
)
@maestre3d
maestre3d / ngrxintro.md
Created July 26, 2020 18:12 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@maestre3d
maestre3d / performance-measuring.md
Created January 20, 2022 04:27 — forked from warpfork/performance-measuring.md
golang performance & benchmarking notes
@maestre3d
maestre3d / logging.go
Created March 21, 2022 02:06 — forked from panta/logging.go
zerolog with file log rotation (lumberjack) and console output
package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"gopkg.in/natefinch/lumberjack.v2"
"os"
"path"
"io"
)
@maestre3d
maestre3d / force-go-package-publish.sh
Created June 17, 2022 04:57
Force a Go package publishing using pure Curl and shell commands.
#!/bin/bash
while getopts ":v:" opt; do
case $opt in
v) VERSION_TAG=$OPTARG;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
@maestre3d
maestre3d / 0-go-os-arch.md
Created July 27, 2022 09:14 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android