Skip to content

Instantly share code, notes, and snippets.

# /// script
# dependencies = [
# "loguru>=0.7.3",
# "openpyxl>=3.1.5",
# "safe-result>=4.0.3",
# ]
# ///
import re
# /// script
# dependencies = [
# "loguru>=0.7.3",
# "openpyxl>=3.1.5",
# "safe-result>=4.0.3",
# ]
# ///
import re
// ==UserScript==
// @name Google Search +
// @namespace http://tampermonkey.net/
// @version 1.9
// @description Extend Google Search with additional options.
// @author overflowy
// @match https://www.google.com/search*
// @match https://www.google.*/search*
// @run-at document-start
// @grant none
#!/usr/bin/env bash
# When a command fails, bash exits instead of continuing with the rest of the script.
set -o errexit
# This will make the script fail, when accessing an unset variable.
# When you want to access a variable that may or may not have been set,
# use "${VARNAME-}" instead of "$VARNAME", and you’re good.
set -o nounset
import csv
import requests
from bs4 import BeautifulSoup
def export_to_csv(url: str):
r = requests.get(url)
soup = BeautifulSoup(r.text, "html.parser")
table = soup.find("table", {"id": "downloadTableEN"})
@overflowy
overflowy / pyproject.toml
Created July 10, 2023 10:50
pyproject.toml example
[tool.poetry]
name = "nala"
version = "0.10.0"
description = "Commandline frontend for the apt package manager"
authors = [
"Blake Lee <[email protected]>",
"Sourajyoti Basak <[email protected]>",
]
license = "GPL-3.0-or-later"
readme = "README.rst"
{
"typeCheckingMode": "basic",
"strictListInference": true,
"strictDictionaryInference": false,
"strictParameterNoneValue": true,
"reportFunctionMemberAccess": "error",
"reportMissingModuleSource": "none",
"reportMissingTypeStubs": "error",
"reportUnusedImport": "error",
"reportUnusedClass": "error",
@overflowy
overflowy / hetzner-gui.user.js
Created June 11, 2023 10:46
Automatically select GUI-Mode when opening a Hetnzer console
// ==UserScript==
// @name hetzner-gui
// @namespace Violentmonkey Scripts
// @match https://console.hetzner.cloud/console/*
// @grant none
// @version 1.0
// @author [email protected]
// @description 11/06/2023, 12:15:51
// ==/UserScript==
@overflowy
overflowy / timer.py
Created June 7, 2023 20:13
Timer decorator
import functools
import time
def timer(func):
@functools.wraps(func)
def wrapper_timer(*args, **kwargs):
tic = time.perf_counter()
value = func(*args, **kwargs)
@overflowy
overflowy / hn-plus.user.js
Last active September 7, 2025 19:57
Hacker News Plus
// ==UserScript==
// @name HN Plus
// @match https://*.ycombinator.com/*
// @grant none
// @version 2.1
// @author overflowy
// @description Adds favicons to HN links and navigation menu for less known sections
// @inject-into content
// ==/UserScript==