Skip to content

Instantly share code, notes, and snippets.

View gogvale's full-sized avatar

Gabriel Oliveira gogvale

View GitHub Profile
@gogvale
gogvale / touchscreen.sh
Created June 7, 2020 17:54
Open config file on lubuntu to enable/disable periferals
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf #line 25
@gogvale
gogvale / clean_rpi4.sh
Created May 1, 2020 04:15
Script to clean all unnecessary programs on Raspberry Pi 4
#!/bin/bash
sudo apt purge geany bluej greenfoot-unbundled mu-editor scratch* sonic-pi sense-emu-tools thonny smartsim libreoffice claws-mail openjdk-* libreoffice-* -y
rm -rf MagPi/
sudo apt autoremove -y
sudo apt autoclean
@gogvale
gogvale / findPhoneImages.sh
Created January 23, 2020 02:19
Find all images in portrait mode
#!/bin/bash
find . -iname '*.??g' -type f -exec identify -format '%w %h %i \n' '{}' \; | awk '$1<$2' | cut -d' ' -f3
@gogvale
gogvale / delete-videos-from-playlist.js
Created January 22, 2020 23:40 — forked from timothyarmstrong/delete-videos-from-playlist.js
Delete all videos in YouTube Playlist
(function() {
var i = window.setInterval(function() {
var closeButton = document.querySelector('.pl-video-edit-remove');
if (closeButton) {
closeButton.click();
} else {
window.clearInterval(i);
}
}, 500);
})();
@gogvale
gogvale / watchLaterPlaylistYoutubeDeleter.js
Created January 22, 2020 23:36
Deletes all videos from Youtube's watch later playlist by selecting and clicking the icons (use it while reproducing said playlist)
icons = document.querySelectorAll('[aria-label="Eliminar"]');
for(let i in icons) {try{icons[i].click()}catch{}};
@gogvale
gogvale / warGame.py
Last active December 1, 2019 03:01
War Card Game in Python using OOP https://en.wikipedia.org/wiki/War_(card_game)
#!/usr/bin/python3
from random import shuffle, randint
import time
SUITE = "H D S C".split()
RANKS = "2 3 4 5 6 7 8 9 10 J Q K A".split()
class Card:
def __init__(self, suite: str, rank: str):
@gogvale
gogvale / Idea.txt
Created August 1, 2018 13:47
Simulador de Horários UANL
[8/1, 08:41] Gabriel: Estuve pensando, y creo que sé qué sería el proceso para usar la herramienta 😃
[8/1, 08:43] Gabriel: Seleccionar la carrera, las materias de un listado, las horas que desea (haría una grid pidiendo seleccionar grupos, tipo M,V,N o individuales o mismo días de semana completos 😃), de las materias, despliegar los maestros disponibles y la calificación de cada uno con un puntaje, y si quiere dar prioridad a la hora o a los maestros.
[8/1, 08:43] Gabriel: De ahí el alumno puede estar editando cuales quiere y se va enseñando al lado como queda 😃
[8/1, 08:43] Gabriel: Cuando este listo, graba la grade de horarios y los códigos del curso 😆
[8/1, 08:44] Gabriel: Cuando llegue la hora de inscripción, se selecciona el archivo guardado y checa si lo horarios están disponible en la página, y si alguna no está, poner en rojo y sugerir cambios, enseñando las posibilidades con la grade de materias visualmente representada 😃
[8/1, 08:45] Gabriel: También se puede hacer un Blacklist de maestros, para eli
@gogvale
gogvale / gmail_imap_example.py
Created May 9, 2018 21:47 — forked from robulouski/gmail_imap_example.py
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
@gogvale
gogvale / dlAttachments.py
Created April 24, 2018 13:59 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'