Skip to content

Instantly share code, notes, and snippets.

View Lampe2020's full-sized avatar
💻

Christian Lampe Lampe2020

💻
View GitHub Profile
@Lampe2020
Lampe2020 / GooglePhotosSelectAll.bookmarklet-url.js
Created September 29, 2024 17:21
"Select all" function for Google Photos
javascript:var l2GPhotoSelectAllInterruptFlag=false;var l2GPhotoSelectAllScrollBox=document.querySelector('.C3Tghf,.T5QJEc,.THsa9b');setInterval(()=>{if(!l2GPhotoSelectAllInterruptFlag){document.querySelectorAll('.ckGgle[aria-checked=false]').forEach((elmnt)=>{elmnt.scrollIntoView();elmnt.click();console.log(`Selecting the image labelled ${elmnt?.ariaLabel}`);});}},(1000/(Number(prompt('Enter how many times per second you want the script to fire.\nThe slower the page loads for you the lower you should set this.\nShould the script get stuck before the bottom, just scroll down a bit until it picks up again. If you needed to do so and are unsure if the script missed any images, run it again on a slower setting until it runs all the way to the bottom without manual scrolling.','1'))||1)));console.log(`l2GPhotoSelectAllScrollBox:`,l2GPhotoSelectAllScrollBox);alert('The script is going to start now. When it reaches the bottom, please run the following command in the console to stop the script:\n\nl2GPhotoSelectAllI
@Lampe2020
Lampe2020 / remove_black_flicker.py
Last active August 10, 2024 07:08
If you have the black flicker at the top of a screen recording because of OBS and the screen getting out-of-sync, this script will attempt to fill in the (literal) blanks using the previous frame. This will cause shearing and may also produce slight artifacts and errors, but it's a lot better than the giant black flicker.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
If you have the black flicker at the top of a screen recording because of OBS and the screen getting out-of-sync, this
script will attempt to fill in the (literal) blanks using the previous frame. This will cause shearing and may also
produce slight artifacts and errors, but it's a lot better than the giant black flicker.
"""
import cv2, time, datetime
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
{N/D}code n~m_b encoded text • Script written by Lampe2020 <kontakt@lampe2020.de> (GitHub:Stehlampe2020)
Encoding definition: n~m_b → n=n bits; m=m'th to last bit flipped; b=binary code that can be decoded to ASCII text if transformations applied
"""
from sys import stderr as STDERR # Make it easy to give output as error
@Lampe2020
Lampe2020 / autoclicker.py
Last active March 19, 2023 21:58
Simple python autoclicker for Linux with `xdotool`
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gi, time, os, random, multiprocessing
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
class MainWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Autoclicker")