Skip to content

Instantly share code, notes, and snippets.

View fastfingertips's full-sized avatar
🧶
knitting..

fastfingertips

🧶
knitting..
View GitHub Profile
# Github bookmarks
---
bookmarks:
keyboard:
- https://www.farah.cl/Keyboardery/A-Visual-Comparison-of-Different-National-Layouts
andr:
- https://stackoverflow.com/a/72406336
- https://stackoverflow.com/a/35691988
github:
- https://github.com/littlecodersh/ItChat/blob/master/itchat/config.py
?from=2022-06-23&rangetype=1day < 2
?from=2022-06-24&rangetype=1day
?from=2022-06-25&rangetype=1day
?from=2022-06-26&rangetype=1day
?from=2022-06-27&rangetype=1day
?from=2022-06-28&rangetype=1day
?from=2022-06-29&rangetype=1day
?from=2022-06-30&rangetype=1day
?from=2022-07-01&rangetype=1day
@fastfingertips
fastfingertips / recycle_bin_manager.pyw
Last active August 17, 2023 11:39
This Python script lets you add or remove the Recycle Bin folder from the 'This PC' section on Windows by modifying the Windows Registry with the 'reg add' or 'reg delete' command. Use it with caution as changes to the Registry can have negative effects on the system.
import os
import sys
import ctypes
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton
def is_admin():
try: return ctypes.windll.shell32.IsUserAnAdmin()
except: return False
{
"iqs": [],
"pgx": [],
"juf": [],
"jqr": [],
"uni": [],
"nfb": [],
"ccr": [],
"hcn": [],
"dls": [
@fastfingertips
fastfingertips / .ps1
Created September 19, 2022 18:57
Process killer
(Get-WmiObject Win32_Process -Filter "name = 'appName.exe'" | where {$_.CommandLine -like '*ARGS*'}).Terminate()
import requests
import json
# The query to get the most popular anime
query = """
query ($page: Int) {
Page (page: $page, perPage: 50) {
media (sort: POPULARITY_DESC, type: ANIME, isAdult: true) {
id
title {
@fastfingertips
fastfingertips / maps.py
Last active September 19, 2022 19:04
All maps
example = '7.0032000,100.469550'
coordinate = input(f'Enter coordinate in format {example}: ')
enlem, boylam = list(map(str.strip, coordinate.split(',')))
sites = {
'Google': f"https://www.google.com/maps/search/?api=1&query={enlem},{boylam}",
'Yandex': f"https://yandex.ru/maps/?pt={boylam},{enlem}",
'Apple': f"https://maps.apple.com/?ll={enlem},{boylam}",
'OpenStreetMap': f"https://www.openstreetmap.org/#map=15/{enlem}/{boylam}",
'Here': f"https://wego.here.com/?map={enlem},{boylam}",
@fastfingertips
fastfingertips / progression.py
Last active February 9, 2024 21:04
Basic loading effect.
import time
def progression_bar(total_time=5, loading_msg="Loading...", end_msg="Completed."):
max_str = max(len(loading_msg), len(end_msg))
loading_msg = loading_msg.ljust(max_str)
end_msg = end_msg.ljust(max_str)
num_bar = 10
sleep_intvl = total_time/num_bar
for i in range(1,num_bar+1):
print(f"\r{loading_msg} {i/num_bar:.1%}", end="")
@fastfingertips
fastfingertips / youtubeCheckbox.js
Last active September 15, 2022 18:57
Is the youtube video being watched available on any of your lists?
var l = document.getElementsByClassName('style-scope ytd-playlist-add-to-option-renderer').length
for (let i = 0; i < l; i++) {
var liste = document.getElementsByClassName('style-scope ytd-playlist-add-to-option-renderer')[i].getAttribute("aria-checked");
if(liste == 'true'){alert("This video is in your playlist.");}
}
/*
var checkbox = document.querySelector("#checkbox")
var listName = document.querySelector("#checkboxLabel")
def uncamel(text):
"""helloWorld => hello_world"""
r = ''
for t in text:
r += '_' + t.lower() if t.isupper() else t
return r
print(uncamel('helloWorld'))
print(uncamel('goodbyeWorld'))
print(uncamel('loremIpsum'))