Skip to content

Instantly share code, notes, and snippets.

View blackle's full-sized avatar
🦈
Blackle is a Shark

Blackle Morisanchetto blackle

🦈
Blackle is a Shark
View GitHub Profile
@blackle
blackle / wiki.py
Created June 26, 2024 07:08
wikipedia perennial sources changes RSS feed generator
#!/usr/bin/env python3
import json
import requests
import wikitextparser as wtp
from difflib import SequenceMatcher
from datetime import datetime, timezone
import dateutil.relativedelta
import schedule
import http.server
import socketserver
@blackle
blackle / blackle_bg3.py
Created June 6, 2024 02:12
background management tool
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject, GLib
from gi.repository.GdkPixbuf import Pixbuf, InterpType
import subprocess, os, time, errno
from xdg_base_dirs import xdg_cache_home, xdg_config_home
import shutil
PROGNAME = "blackle_backgrounder"
@blackle
blackle / noTabScroll.uc.js
Created February 22, 2023 00:21
Userscript for disabling tab scroll
// ==UserScript==
// @name noTabScroll
// @author blackle
// @include main
// @startup UC.noTabScroll.exec(win);
// @shutdown UC.noTabScroll.destroy();
// @onlyonce
// @shutdown
// ==/UserScript==
@blackle
blackle / userChrome.css
Last active June 6, 2024 07:49
win95 style firefox
* {
--blackle-bgcolor: #ACBABF;
--toolbar-bgcolor: var(--blackle-bgcolor) !important;
--lwt-accent-color: var(--blackle-bgcolor) !important;
}
.tabbrowser-tab:not([pinned]) {
min-width: 1px !important;
}
#!/usr/bin/env python3
import http.server
import socketserver
import threading
from urllib.parse import urlparse
from math import sqrt
import time
import pyvips
import ssl
#!/usr/bin/env python3
import math
def printen(string):
print(string, end="")
items=[
{"url":"https://staging.cohostcdn.org/attachment/4e61ceb0-6840-4b80-821a-be6a01338300/art.jpg","ratio":1.42539},
{"url":"https://staging.cohostcdn.org/attachment/13d3f7b3-df6b-465f-b427-49e8a88dac03/bookshelf.png","ratio":0.711744},
{"url":"https://staging.cohostcdn.org/attachment/879ffd80-2e4c-4afd-a4cf-9dd40c9d0acd/lamp.png","ratio":0.384695},
#!/usr/bin/env python3
def printen(strr):
print(strr, end='')
internet_text='''<h1 style="font-size: 1.8em;margin-bottom: 0.25em;padding: 0;font-family: 'Linux Libertine','Georgia','Times',serif;line-height: 1.3; border-bottom: 1px solid #a2a9b1;font-weight:normal;">Basilisk collection</h1>
<div style="font-family: sans-serif;font-size: calc(1em * 0.8);margin-bottom:1.1em;">From Wikipedia, the free encyclopedia</div>
<p style="font-family: sans-serif;margin: 0.5em 0;font-size: calc(1em * 0.875);line-height: 1.6;">The <b>basilisk collection</b> (also known as the <b>basilisk file</b> or <b>basilisk.txt</b>) is a collection of over 125 million <a style="color:#0645AD;" href="https://en.wikipedia.org/wiki/Proof_of_work#Background" title="Proof of work">partial hash inversions</a> of the <a style="color:#0645AD;" href="https://en.wikipedia.org/wiki/SHA-256" class="mw-redirect" title="SHA-256">SHA-256</a> <a style="color:#0645AD;" href="https://en.wikipedia.org/wiki/Cryptographic_hash_function" title="Crypt
#!/usr/bin/env python3
import random
def printen(strr):
print(strr, end='')
PANEL_ON = "https://staging.cohostcdn.org/attachment/f4e82b02-9cce-4da5-a768-9b9e90271b7b/panel1.png"
PANEL_OFF = "https://staging.cohostcdn.org/attachment/91402e8b-ad9b-4bc2-a710-9f4b411b1229/panel2.png"
#!/usr/bin/env python3
import random
from math import floor, sin
def printen(strr):
print(strr, end='')
drawers = [
["https://staging.cohostcdn.org/attachment/d305d6ee-247d-4a2c-8554-08d1769271ca/0007.png",
"https://staging.cohostcdn.org/attachment/41f6e39e-a678-47dc-93f7-750045bf7004/0009.png",
"https://staging.cohostcdn.org/attachment/25d5915d-4757-4526-b303-996be4e24d1e/0008.png"],
#!/usr/bin/env python3
def printen(strr):
print(strr, end='')
adventure = [
'''welcome to the <b>choost adventure engine!</b>
would you like to play a game?''',
{