Skip to content

Instantly share code, notes, and snippets.

View zeroidentidad's full-sized avatar
:shipit:
00:00 ᴢᴇʀᴏ:/~ go run js.go

フ乇丂ひ丂 zeroidentidad

:shipit:
00:00 ᴢᴇʀᴏ:/~ go run js.go
View GitHub Profile
@zeroidentidad
zeroidentidad / grub
Last active September 26, 2023 04:23
grub config Lubuntu 18.04 with AMD CPU and integrated GPU
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="default text amdgpu.noretry=0 amdgpu.dc=1 amdgpu.cik_support=1 amdgpu.si_support=1 radeon.si_support=0 radeon.cik_support=0"
@zeroidentidad
zeroidentidad / app.js
Created October 18, 2019 00:02
JS FrontEnd: uso de modulos y exportación de clases (ES6+)
import variableModulo, {MiClase} from "./modulo.js";
const texto = document.createElement("p");
texto.textContent = variableModulo;
contenedor.appendChild(texto);
const obj = {propx: 'holax', propy: 'holay'}
const usar = new MiClase(obj, 'otro valor');
usar.miFuncion();
@zeroidentidad
zeroidentidad / docker-compose.yml
Created October 28, 2019 23:08
hub.docker.com/r/bitnami/laravel
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:10.1'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=my_user
- MARIADB_DATABASE=my_database
- MARIADB_PASSWORD=my_password
@zeroidentidad
zeroidentidad / ternario.go
Last active June 24, 2023 14:59
Idea helper ternario en Go
package main
import (
"fmt"
)
func main() {
// Con tipos primitivos definidos
a := ternaryInt64(5 > 88, 13, 0)
b := ternaryString(3 > 1, "correcto", "incorrecto")
@zeroidentidad
zeroidentidad / mass_git_updater.py
Created June 30, 2021 15:08 — forked from lggomez/mass_git_updater.py
[Python] Mass git updater
__author__ = "lggomez"
__copyright__ = "Copyright 2017"
__credits__ = ["Luis Gomez"]
__license__ = "MIT"
__version__ = "0.3"
__maintainer__ = "lggomez"
__status__ = "Production"
import argparse
import os
@zeroidentidad
zeroidentidad / sendMail.go
Created August 30, 2021 18:43 — forked from narukoshin/sendMail.go
Send SMTP email with Go
package main
import (
"crypto/tls"
"errors"
"log"
"net"
"net/smtp"
"strings"
)
@zeroidentidad
zeroidentidad / script_pixel.sh
Last active June 29, 2022 21:21
Run ADV emulator externally
#!/usr/bin/env bash
# pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY chmod 777 /dev/kvm - stackoverflow.com/questions/37300811/android-studio-dev-kvm-device-permission-denied
export ANDROID_EMULATOR_LAUNCHER_DIR=/home/zeroidentidad/Android/Sdk/emulator
export LD_LIBRARY_PATH=/home/zeroidentidad/Android/Sdk/emulator/lib64/qt/lib:/home/zeroidentidad/Android/Sdk/emulator/lib64/libstdc++:/home/chucho/Android/Sdk/emulator/lib64/gles_angle11:/home/zeroidentidad/Android/Sdk/emulator/lib64/gles_angle9:/home/zeroidentidad/Android/Sdk/emulator/lib64/gles_angle:/home/zeroidentidad/Android/Sdk/emulator/lib64/gles_swiftshader:/home/zeroidentidad/Android/Sdk/emulator/lib64
EMULATOR86="/home/zeroidentidad/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64"
EMULATOR="/home/zeroidentidad/Android/Sdk/emulator/emulator"
DEVICE=`$EMULATOR -list-avds tail -1`
RUN="$EMULATOR86 -netdelay none -netspeed full -avd $DEVICE"
@zeroidentidad
zeroidentidad / ember.js
Last active June 24, 2023 14:57
Classic Ember.js CheatSheet
/*
* -----------------------
* Classic Ember.js Cheatsheet
* -----------------------
*
* Docs: https://guides.emberjs.com/
* Quick start: https://guides.emberjs.com/current/getting-started/quick-start/
*
* Table of contents
* -------------------
@zeroidentidad
zeroidentidad / gaia_localidades.go
Last active September 29, 2022 04:31
API endpoint procesador intermediario personalizado de localidades de Mexico via webservice Gaia del INEGI
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
type GaiaTruncatedData struct {
@zeroidentidad
zeroidentidad / gist:d18a263885c5f82a33b8622e623e5542
Created September 23, 2022 19:14 — forked from alexedwards/gist:dc3145c8e2e6d2fd6cd9
Example of working with Go's database/sql and NULL fields
CREATE TABLE books (
isbn char(14) NOT NULL,
title varchar(255),
author varchar(255),
price decimal(5,2)
);
INSERT INTO books (isbn, title, author, price) VALUES
('978-1503261969', 'Emma', 'Jayne Austen', 9.44),
('978-1514274873', 'Journal of a Soldier', NULL, 5.49),