Skip to content

Instantly share code, notes, and snippets.

View juanbrujo's full-sized avatar
:octocat:

Jorge Epuñan juanbrujo

:octocat:
View GitHub Profile
@juanbrujo
juanbrujo / santorales-catolicos.json
Last active August 29, 2025 12:55
Santorales católicos por mes en formato JSON
{
"enero":[
"María, Madre de Dios",
"Basilio, Gregorio",
"Genoveva",
"Yolando, Rigoberto",
"Emilia",
"Wilma, Melanio",
"Raimundo",
"Luciano, Eladio",
@juanbrujo
juanbrujo / InstallIPTVoverPlexMediaServer.md
Last active November 15, 2025 22:46
Install IPTV channels list over Plex Media Server
@juanbrujo
juanbrujo / fetchRemoteBranches2Local
Last active April 26, 2025 23:59
Fetch all remote branches to local
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
# https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
@juanbrujo
juanbrujo / netlify.toml
Created September 28, 2020 14:06
Netlify configuration for routes in a SPA
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
@juanbrujo
juanbrujo / select.html
Last active August 19, 2020 21:50
HTML native select attribute that holds the dropdown with scroll if needed by viewport
<!-- test: https://jsbin.com/renixijogu/1/edit?html,css,output -->
<select size="number">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
@juanbrujo
juanbrujo / Mati.vue
Created October 15, 2019 14:49
How to use Mati (getmati.com) Web SDK in a VueJS project
<template>
<div>
<div v-html="MatiButton('CLIENTID')"></div>
</div>
</template>
<script>
const obj = {}
Object.keys(obj).length === 0 && obj.constructor === Object
@juanbrujo
juanbrujo / checkEmail.vue
Created August 29, 2019 15:21
Regex to check if email is valid for a Vue.js method.
checkEmail: function (email) {
// eslint-disable-next-line
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
if (reg.test(email)) return false
return true
}
@juanbrujo
juanbrujo / custom-error-on-specific-route.js
Created August 7, 2019 16:03
json-server: Custom error (400, 500) when targeting specific route
const jsonServer = require('json-server')
const server = jsonServer.create()
const router = jsonServer.router('mock/db.json')
const middlewares = jsonServer.defaults()
const port = process.env.PORT || 3000
server.use(middlewares)
// send error message when validating code on invest
server.get('/invest_url', (req, res) => {