Skip to content

Instantly share code, notes, and snippets.

Avatar

Nika Zhenya NikaZhenya

View GitHub Profile
@NikaZhenya
NikaZhenya / htmlclean
Last active Apr 17, 2019
Limpia HTML exportados por InDesign eliminando div, overrides, valores que inician '_id', atributos vacíos y span vacíos.
View htmlclean
#!/bin/sh
clean ()
{
# Elimina en el siguiente orden:
# 1. Etiquetas div.
# 2. Overrides.
# 3. Elimina valores de atributos que inician con '_id'.
# 4. Elimina atributos vacíos.
# 5. Etiquetas span sin atributos.
@NikaZhenya
NikaZhenya / rename-images
Last active Mar 18, 2019
Renombra imágenes en pila.
View rename-images
#!/usr/bin/env ruby
# encoding: UTF-8
# coding: UTF-8
# Instalación:
# sudo wget https://gist.githubusercontent.com/NikaZhenya/b18bd4f4e4a04a9b0036f2e7c90a580b/raw/69df2ea17d88683e5d05b74989b97d27b26b1759/rename-images -P /usr/local/bin && sudo chmod +755 /usr/local/bin/rename-images
require 'fileutils'
begin
@NikaZhenya
NikaZhenya / shrinkpdf
Last active Apr 12, 2019
Compress PDF files.
View shrinkpdf
#!/bin/sh
# Original script: https://app.box.com/s/9ojoni2asyeq945qj61h8kwnewno5gdi
# This versions avoids page autorotation.
#
# Install:
# sudo wget -P /usr/local/bin && sudo chmod +755 /usr/local/bin/shrinkpdf
# Usage:
# shrinkpdf infile [outfile]
#
View stop-librescan.sh
sudo docker container stop librescan
sudo systemctl stop docker
echo "--------------------"
echo "LibreScan deshabilitado."
@NikaZhenya
NikaZhenya / start-librescan.sh
Last active Feb 20, 2019
Inicia lo necesario para LibreScan.
View start-librescan.sh
sudo systemctl start docker
sudo docker container start librescan
echo "--------------------"
echo "LibreScan habilitado. Ingresa a http://0.0.0.0:8080 para escanear."
echo "--------------------"
echo "Conecta las cámaras."
echo "Ejecuta 'ps ax | grep gvfs'."
echo "Mata el proceso 'gvfs-gphoto2-volume-monitor' según su número de pin con 'kill PIN'."
View gist:bc619c6a8266045c87ed76301a708b00

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 |

@NikaZhenya
NikaZhenya / xmlhttprequest.js
Last active Aug 12, 2019
XMLHttpRequest simplificado.
View xmlhttprequest.js
function request (url) {
var xhr = new XMLHttpRequest();
// Inicio de la petición
xhr.open('GET', url);
xhr.responseType = 'text';
xhr.send();
// Cuando está cargando
xhr.onprogress = function (e) {
You can’t perform that action at this time.