Skip to content

Instantly share code, notes, and snippets.

@supershadoe
supershadoe / test.py
Created October 20, 2024 09:42
Scraping links from images using selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def search_by_image(image_path):
driver = webdriver.Chrome()
try:
driver.get('https://images.google.com/')
search_by_image_button = WebDriverWait(driver, 3).until(
@supershadoe
supershadoe / tierlist.html
Created October 18, 2024 16:41
Tierlist clone using JS drag-drop API
<!DOCTYPE html>
<html>
<head>
<title>Tier list</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Codystar&display=swap" rel="stylesheet">
</head>
<body>
<div id="page">
@supershadoe
supershadoe / How-to.md
Created August 29, 2022 21:11
Hosting a discord bot on termux using hikari
  • Disable battery optimization for termux
  • Install termux:widgets plugin from GitHub (optional)
  • Install python and git using pkg i python git
  • Install virtualenv using system pip
  • Clone your bot's code or copy it from your device storage by first setting up file access using termux-setup-storage.
  • Create a venv for your project
  • Install all dependencies including hikari using the venv pip

Do not install uvloop as that doesn't work well with termux.

@supershadoe
supershadoe / PKGBUILD.diff
Last active August 1, 2022 12:02
ibus-mozc with gtk2 instead of qt
diff --git a/PKGBUILD b/PKGBUILD
index b5a7e6e..27ccef5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ arch=('x86_64')
url='https://github.com/google/mozc'
license=('Apache' 'BSD' 'LGPL' 'custom')
depends=('ibus>=1.4.1' 'mozc>=2.28.4800.102')
-makedepends=('bazel' 'git' 'python' 'qt5-base')
+makedepends=('bazel' 'git' 'python' 'gtk2')
@supershadoe
supershadoe / MY-UBLOCK-FILTERS.md
Last active September 13, 2024 23:36
Some uBlock₀ filters

Many of these filters are usually cosmetic instead of for blocking/skipping ads or something (Although some are used for that purpose like yt-filter)

To import a filter into Some uB₀, type the link https://gist.github.com/supershadoe/aed9db4c220b9150d2361a369f7be2f2/raw/{the filter to import, e.g., spotify; without the braces obviously}-ublock-filter.txt into uB₀ settings -> Filter lists -> Custom -> Import

Links to copy for filters (this may not be up to date)

Website Link
Spotify Spotify
@supershadoe
supershadoe / reboot-menu.sh
Last active May 11, 2022 15:27
systemd-boot reboot menu in zenity
#!/usr/bin/env sh
# vim:sw=4:ts=4:sts=4:et
# Reboot menu script
# This script displays a list of boot entries registered in systemd-boot
# Makes it easier to directly reboot to another OS (if dual or multi-booting)
# Created by supershadoe <supershadoe5[at]gmail[dot]com>
# (Skip to line 43 if you want to just see the code)
# COPYRIGHT NOTICE
@supershadoe
supershadoe / ytmp.sh
Created June 25, 2020 11:46
A script to play a youtube video or its audio alone in mpv.
#!/bin/sh
# vim:sw=4:ts=4:et
################################################################################
# #
# A shell script which searches youtube for a video or audio #
# and plays it in mpv. #
# Created by Supershadoe #
# #
################################################################################