Skip to content

Instantly share code, notes, and snippets.

View viceo's full-sized avatar
🇲🇽
Working from home

Leopoldo Muñoz viceo

🇲🇽
Working from home
  • Fermilab
  • Batavia IL
View GitHub Profile
@viceo
viceo / 80-touchscreen.rules
Last active June 11, 2020 02:00
Deshabilitar drivers en Linux (Molestos Touchscreen)
# Encuentras el idVendor y el idProduct haciendo
cat /proc/bus/input/devices
# Despues de guardar hacer como root (sin necesidad de reboot)
udevadm control --reload-rules && udevadm trigger
# Ubicación
# /etc/udev/rules.d/80-touchscreen.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="04f3", ATTRS{idProduct}=="20d0", ATTR{authorized}="0"
@viceo
viceo / gist:a1ab4cddde2d445c0d635b6758342f5d
Created April 12, 2019 16:45
WoeUSB Installation Command
Instalar Windows 10
$ sudo woeusb --tgt-fs NTFS -d /path/of/iso /path/of/dev/usb

Crear y Correr nuevo contenedor

$ docker run

Crear nuevo contenedor

$ docker create

Correr contenedor

$ docker run -a

Ver lista de contenedores (procesos)

@viceo
viceo / imageToBase64.js
Created October 31, 2018 04:18 — forked from gfcarvalho/imageToBase64.js
Converting a local image to base64 using JavaScript (canvas + regexp)
function imageToBase64(img)
{
var canvas, ctx, dataURL, base64;
canvas = document.createElement("canvas");
ctx = canvas.getContext("2d");
canvas.width = img.width;
canvas.height = img.height;
ctx.drawImage(img, 0, 0);
dataURL = canvas.toDataURL("image/png");
@viceo
viceo / git-log2json.sh
Created April 13, 2018 04:45 — forked from textarcana/git-log2json.sh
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features :) UPDATED 2017: Today I would just use https://github.com/tarmstrong/git2json
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'