Skip to content

Instantly share code, notes, and snippets.

View sotlucas's full-sized avatar
🪐

Lucas Sotelo sotlucas

🪐
View GitHub Profile
@sotlucas
sotlucas / yt_downloader.py
Last active May 23, 2020 11:59
Downloads a whole youtube playlist & converts all to mp3
import os
import subprocess
import pytube
from time import sleep
import sys
def show_progress_bar(stream, chunk, file_handle, bytes_remaining):
"""
Shows progress bar
"""
@sotlucas
sotlucas / xorg.conf
Created December 20, 2018 13:48
If you have a ETPS/2 Elantech Touchpad that it's not working, you can try this and see if it works. In /etc/X11/ create a file named xorg.conf, paste this, save and reboot.
Section "InputClass"
Identifier "Touchpad" # required
MatchIsTouchpad "yes" # required
Driver "synaptics" # required
Option "MinSpeed" "0.5"
Option "MaxSpeed" "1.0"
Option "AccelFactor" "0.075"
Option "TapButton1" "1"
Option "TapButton2" "2" # multitouch
Option "TapButton3" "3" # multitouch
@sotlucas
sotlucas / autoclicker.py
Last active April 25, 2019 16:33
Simple autoclicker. Dependencies in comment.
import pyautogui
import keyboard
import sys
# Change this to whatever shortcut you want
start_shortcut = 'alt+x'
stop_shortcut = 'esc'
def info():
print(f'Press {start_shortcut} to start')
@sotlucas
sotlucas / regex_cheatsheet.md
Last active May 26, 2019 16:38
RegEx Cheatsheet

RegEx Cheatsheet

Character Classes

. any character except newline

\w \d \s word, digit, whitespace

\W \D \S not word, digit, whitespace

@sotlucas
sotlucas / mysql_cheatsheet.md
Last active July 22, 2019 01:20
MySQL Cheatsheet

Create table

CREATE TABLE table_name(
  column_name TYPE CONSTRAINT1 CONSTRAINT2,
  another_column TYPE CONSTRAINT1
);

Delete table

@sotlucas
sotlucas / create_desktop.md
Created October 12, 2019 22:05
Creating .desktop files

Save a name.desktop file in ~/.local/share/applications Here's a sample .desktop file:

[Desktop Entry]
Name=name of the application
Comment=whatever description
Exec=command to run
Icon=icon path
Terminal=false
Type=Application