Skip to content

Instantly share code, notes, and snippets.

View perseoq's full-sized avatar
🐧
pingü

Rodrigo perseoq

🐧
pingü
View GitHub Profile
@perseoq
perseoq / keyboard.md
Last active November 22, 2023 12:46
HP LAPTOP: Fix lag keyboard login gnome3 gdm / Solución al fallo del lagueo o retardo del teclado en el login del gnome3

Paso 1.- Primero abres el archivo con nano, el cual se encuentra en la siguiente ruta:

sudo nano /etc/default/grub

Paso 2.- Agregamos la siguiente línea y comentamos la línea GRUB_CMDLINE_LINUX_DEFAULT que ya estaba

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nopnp=1 i8042.dumbkbd=1"

Salvamos y salimos

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button id="myBtn">Abrir ventana modal</button>
@perseoq
perseoq / draw_a_line.html
Created March 9, 2023 21:17
Cambia de tamaño una linea con Javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<canvas id="myCanvas"></canvas>
@perseoq
perseoq / install-apps.sh
Created December 25, 2021 20:18 — forked from aamnah/install-apps.sh
Bash script to install packages [Git, s3cmd] on a new system. For Debian and Ubuntu. To run, copy the script to the server and run ``bash install-apps.sh``
#!/bin/bash/
#######################################
# Bash script to install apps on a new system (Ubuntu)
# Written by @AamnahAkram from http://aamnah.com
#######################################
## Update packages and Upgrade system
sudo apt-get update -y
## Git ##
@perseoq
perseoq / bash file
Created August 18, 2021 14:41
remover cabecera y pies de pagina
pdftotext -y 80 -H 650 -W 1000 -nopgbrk -eol unix example.pdf
-y 80 -> crop 80 pixels after the top of file (remove header);
-H 650 -> crop 650 pixels after the -y has cropped (remove footer);
-W 1000 -> hight value to crop nothing (need especify something);
@perseoq
perseoq / sudoSample.py
Created July 27, 2021 01:57 — forked from aeroaks/sudoSample.py
Run Sudo command using Python
import subprocess
# run command using Popen and provide password using communicate.
# password requires byte format.
# sudo -S brings password request to PIPE
proc = subprocess.Popen(['sudo', '-S', 'nano', 'test.txt'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate(input=b'password\n')
# Print output and errors
print(proc)
@perseoq
perseoq / perseoq34.py
Last active September 14, 2022 14:32
Insert HTML tag in a selected text / tkinter (Text Widget) / [Replace text selected with new text]
def bold(self):
selexion = self.mensaje.get(SEL_FIRST, SEL_LAST) # get original string
rpl = " <p>" + selexion + "</p> " # costruct new string
self.mensaje.insert(INSERT,rpl) # insert new string
self.mensaje.delete(SEL_FIRST,SEL_LAST) # delete old string
return
@perseoq
perseoq / fecha_edad.cpp
Created August 29, 2018 21:11
Archivo en C++ que dice la edad en que naciste con uso de string.h y time.h
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <string>
using namespace std;
main(){
time_t t=time(NULL);
@perseoq
perseoq / acentos_espanol.tex
Created December 14, 2016 17:53
Acentos, Símbolo de grados, tilde de la Ñ para LATEX (Libro)
\documentclass[12pt,a4paper]{book}
\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{selinput}
\SelectInputMappings{
aacute={á},
#!/usr/bin/env bash
URL="https://github.com/gkovacs/pdfocr.git"
INSTALL_DIR="/opt/pdfocr"
INSTALL_PREFIX="/usr/local"
if ! type git > /dev/null 2>&1; then
echo "'git' is not found. Install it with the command below and try again"
echo
echo " $ sudo apt-get install git"
echo