Skip to content

Instantly share code, notes, and snippets.


Lucio G Pazos xerardoo

View GitHub Profile
xerardoo / free-dns.txt
Last active Jul 12, 2021
Free Open Public DNS Server - Quad9 (Malware Blocking Enabled):
View free-dns.txt
Free Open Public DNS Server
Quad9 (Malware Blocking Enabled):
Primary: 2620:fe::fe
View checkout
var order OrderReq
err := c.BindJSON(&order)
if err != nil {
c.JSON(500, gin.H{"msg": err.Error()})
currentcb := m.GetCurrentCashBalance()
if currentcb.ID == 0 {
c.JSON(400, gin.H{"msg": "No cash balance opened - No existe corte de caja abierto"})
xerardoo / scrollTop.vue
Created Jun 5, 2020
scoll top vue component
View scrollTop.vue
<button @click="goUp" class="btn-up" v-bind:class="{ 'd-block': show }">
<font-awesome-icon :icon="['fas', 'arrow-circle-up']"/>
// Based on:
export default {
name: "ScrollTop",
xerardoo / compat_l5.php
Created Apr 8, 2020 — forked from vluzrmos/compat_l5.php
Lumen L5 compatibility helpers. That file should be added on root path of your project... and added to your composer.json
View compat_l5.php
* Return the path to config files
* @param null $path
* @return string
function config_path($path=null)
xerardoo / LumenNginxUbuntu
Created Mar 14, 2020 — forked from melcma/LumenNginxUbuntu
Lumen + Nginx + Ubuntu
View LumenNginxUbuntu
cd ~
sudo apt-get update
1. Install PHP and Nginx
#apt-get install software-properties-common
sudo apt-get -y install nginx php7.0 php7.0-fpm php7.0-mbstring php7.0-xml git composer
2. Config Nginx
xerardoo / interceptors.js
Last active Mar 13, 2020
Axios Vue2 Interceptor Setup for Authorization Header and Redirect
View interceptors.js
Axios.interceptors.request.use(function (config) {
const session = JSON.parse(localStorage.getItem('session'));
config.headers['X-Token'] = session ? `${session.token}` : '';
return config;
Axios.interceptors.response.use((response) => { // intercept the global error
return response
}, function (error) {
if (error.response.status === 401) { // if the error is 401 and hasent already been retried
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Nuevo Contacto</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="">
xerardoo / listusers.bash
Created Jan 11, 2018
List All Users on linux
View listusers.bash
# Name: listusers.bash
# Purpose: List all normal user and system accounts in the system. Tested on RHEL / Debian Linux
# Author: Vivek Gite <>, under GPL v2.0+
# -----------------------------------------------------------------------------------
## get mini UID limit ##
l=$(grep "^UID_MIN" $_l)
xerardoo / functions.php
Last active Sep 18, 2015 — forked from gnikolopoulos/functions.php
Add Defer and Async Attributes to Render Blocking Javascript in WordPress
View functions.php
function defer_js_async($tag){
// scripts to defer.
$scripts_to_defer = array('script-name1.js', 'script-name2.js', 'script-name3.js');
// scripts to async.
$scripts_to_async = array('script-name1.js', 'script-name2.js', 'script-name3.js');
foreach($scripts_to_defer as $defer_script){
xerardoo / httpd.conf
Last active Aug 29, 2015
comprimir gzip apache
View httpd.conf
LoadModule deflate_module modules/
<IfModule mod_deflate.c>
# Activamos la compresión
SetOutputFilter DEFLATE
# Indicamos los tipos de contenido a comprimir