Skip to content

Instantly share code, notes, and snippets.

Jose Quintana 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 / logrotator.js
Created Oct 11, 2019
Write a log file with rotation option in Node JS
View logrotator.js
const streamFileArchive = require("stream-file-archive")
const Stream = require("stream")
/**
* Write a log file with rotation option
*
* @param {String} path Log file path
* @param {String} symlink Log file path symlink (latest log file)
* @param {String} separator String seprator for log data (E.g. separator for array of strings passed into `write` method)
*/
@joseluisq
joseluisq / minify_xml.js
Last active Oct 11, 2019
XML Minifier in Javascript / NodeJS
View minify_xml.js
/**
* A tool to minify XML strings
* This code was borrowed and adapted from vkbeautify xml
* https://github.com/vkiryukhin/vkBeautify/blob/master/vkbeautify.js
*/
function XMLMinifier () {
function xml(text, step = "\t") {
const ar = text
.replace(/>\s{0,}</g, "><")
.replace(/</g, "~::~<")
@joseluisq
joseluisq / 0README.md
Created Sep 10, 2019
How to setup Jenkis v2 for automatic testing and docker deployment
View 0README.md

How to setup Jenkis v2 for automatic testing and docker deployment

Stages:

All commit changes

  • 1. Clone project repository: Just checkout the repository
  • 2. Build a Docker image: Build Docker image base on some Dockerfile.
  • 3. Test Docker image: Apply some custom testing processes (unit tests, etc)
@joseluisq
joseluisq / software-categories.json
Last active Sep 7, 2019
Full JSON file with all kind of Software Categories (1478 entries)
View software-categories.json
{"categories":[{"id":1,"group":"#","slug":"360-degree-feedback-software","title":"360 Degree Feedback Software","tags":["360","degree","feedback","software","appraisal","review","multi","rater","multi-rater"]},{"id":2,"group":"#","slug":"3d-architecture-software","title":"3D Architecture Software","tags":["3d","architecture","software"]},{"id":3,"group":"#","slug":"3d-cad-software","title":"3D CAD Software","tags":["3d","cad","software","computer","aided","design"]},{"id":4,"group":"A","slug":"ab-testing-software","title":"AB Testing Software","tags":["ab","testing","software","a/b","multivariate"]},{"id":5,"group":"A","slug":"account-based-marketing-software","title":"Account Based Marketing Software","tags":["account","based","marketing","software"]},{"id":6,"group":"A","slug":"accounting-software","title":"Accounting Software","tags":["accounting","software","gl","ap","ar","a/r","a/p","bookkeeping","general","ledger"]},{"id":7,"group":"A","slug":"accounting-practice-management-software","title":"Accounting
@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) {
You can’t perform that action at this time.