Skip to content

Instantly share code, notes, and snippets.

View joseluisq's full-sized avatar

Jose Quintana joseluisq

View GitHub Profile
@joseluisq
joseluisq / xdebug_installation.md
Last active March 20, 2024 14:43
Install PHP Xdebug on Fedora / CentOS x64

PHP Xdebug installation on Fedora/CentOS x64

First, install xdebug package on system:

$ sudo yum install php-pecl-xdebug.x86_64

Or with DNF:

@joseluisq
joseluisq / README.md
Last active March 7, 2024 05:43
Install PHP 7 Xdebug in Arch Linux

Install PHP 7 Xdebug in Arch Linux

"Normally", these instructions should be also valid (in similar way) for other Linux distros.

1.- Install Xdebug using pacman:

sudo pacman -Sy xdebug
@joseluisq
joseluisq / invalid_or_corrupted_package.md
Created August 1, 2018 20:51
How To Fix “invalid or corrupted package (PGP signature)” Error In Arch Linux
@joseluisq
joseluisq / README.md
Last active February 6, 2024 22:01
Install and configure Traefik as Reserver Proxy in a non-docker environment.

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 / 0README.md
Last active December 11, 2023 04:34
Configuring httpd (apache2) and php 7.2 in Mac using Homebrew

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 / gitea_1.21.1.log
Created December 3, 2023 03:47
Gitea 1.21.1 Error Log for "PANIC whilst trying to do migrate task: runtime error"
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2023/12/03 02:39:00 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 16
2023/12/03 02:39:00 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.21.1 built with GNU Make 4.4.1, go1.21.4 : bindata, timetzdata, sqlite, sqlite_unlock_notify
2023/12/03 02:39:00 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
2023/12/03 02:39:00 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
2023/12/03 02:39:00 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea
2023/12/03 02:39:00 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea
2023/12/03 02:39:00 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini
2023/12/03 02:39:00 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run web server
@joseluisq
joseluisq / Debugging.md
Last active September 3, 2023 16:54
A simple NodeJS App debugging example in VS Code using Nodemon.

NodeJS debugging in VS Code with Nodemon

A simple NodeJS App debugging example in VS Code using Nodemon.

Note: Feel free to customize .vscode/launch.json and ./nodemon.json files.

Install

yarn add nodemon --dev
@joseluisq
joseluisq / slugify.js
Last active August 3, 2023 17:21 — forked from mathewbyrne/slugify.js
Javascript Slugify
function slugify (text, ampersand = 'and') {
const a = 'àáäâèéëêìíïîòóöôùúüûñçßÿỳýœæŕśńṕẃǵǹḿǘẍźḧ'
const b = 'aaaaeeeeiiiioooouuuuncsyyyoarsnpwgnmuxzh'
const p = new RegExp(a.split('').join('|'), 'g')
return text.toString().toLowerCase()
.replace(/[\s_]+/g, '-') // Replace whitespace and underscore with single hyphen
.replace(p, c =>
b.charAt(a.indexOf(c))) // Replace special chars
.replace(/&/g, `-${ampersand}-`) // Replace ampersand with custom word
@joseluisq
joseluisq / README.md
Last active June 14, 2023 09:15
Javascript: Get part of string matching a Regular Expression and then pass its value to a callback

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) {
@joseluisq
joseluisq / List of in-browser VMs.md
Created June 9, 2023 22:22 — forked from SMUsamaShah/List of in-browser VMs.md
List of Javascript based virtual machines running in browser