Skip to content

Instantly share code, notes, and snippets.

⚡️
Migrating all my repos progressively to https://git.joseluisq.net/joseluisq

Jose Quintana joseluisq

⚡️
Migrating all my repos progressively to https://git.joseluisq.net/joseluisq
Block or report user

Report or block joseluisq

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
@joseluisq
joseluisq / debug.go
Last active Jul 25, 2019
Simple Go dump function for struct slices variables (WIP) https://play.golang.org/p/KxpMJdFSDkI
View debug.go
package main
import (
"fmt"
)
type (
Author struct {
Name string
Email string
@joseluisq
joseluisq / ALTERNATIVES.adoc
Created Jul 17, 2019 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
View ALTERNATIVES.adoc
@joseluisq
joseluisq / Makefile
Last active Jul 15, 2019 — forked from sighingnow/Makefile
Detect operating system in Makefile.
View Makefile
# Detect operating system in Makefile.
# Author: He Tao
# Date: 2015-05-30
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG += -D WIN32
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
OSFLAG += -D AMD64
endif
@joseluisq
joseluisq / www-url.md
Created Jul 4, 2019
Replace non-www to www string url in Javascript
View www-url.md
const REGEX_WWW = /^https:\/\/(?!www\.)(.*)$/

"https://domain.com".replace(REGEX_WWW, "https://www.$1")
// "https://www.domain.com"

"https://www.domain.com".replace(REGEX_WWW, "https://www.$1")
// "https://www.domain.com"
@joseluisq
joseluisq / README.md
Last active Jun 25, 2019
Install and configure Traefik as Reserver Proxy in a non-docker environment.
View README.md

Traefik as Reserver Proxy in RHE/CentOS 7

Install and configure Traefik as Reserver Proxy in a non-docker environment.

Donwload and install Traefik

curl -L https://github.com/containous/traefik/releases/download/v1.7.12/traefik_linux-amd64 -o /usr/local/bin/traefik
chmod +x /usr/local/bin/traefik
@joseluisq
joseluisq / README.md
Last active Apr 12, 2019
Javascript: Get part of string matching a Regular Expression and then pass its value to a callback
View README.md

Pick part of an string using a Regex

Get part of string matching a Regular Expression and then pass its value to a callback

const pickStringByRegex = (pattern, str, func) => {
    const regex = new RegExp(pattern)
    const value = regex.test(str) ? str.replace(regex, '$2') : null

  if (value) {
View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@joseluisq
joseluisq / envoy_secured_stats_config.yml
Created Mar 18, 2019 — forked from ofek/envoy_secured_stats_config.json
Envoy secured stats endpoint example
View envoy_secured_stats_config.yml
admin:
access_log_path: /dev/null
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 8081
static_resources:
listeners:
- address:
@joseluisq
joseluisq / 0README.md
Last active May 22, 2019
Configuring httpd (apache2) and php 7.2 in Mac using Homebrew
View 0README.md

Configuring httpd (apache2) and php 7.2 in Mac using Homebrew

# 0. Disable built-in Apache
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# 1. Install httpd
brew install httpd
@joseluisq
joseluisq / docker-swarm-ports.md
Created Mar 6, 2019 — forked from BretFisher/docker-swarm-ports.md
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables
View docker-swarm-ports.md

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

You can’t perform that action at this time.