Skip to content

Instantly share code, notes, and snippets.

verhovsky / minimal-stackoverflow-ui.txt
Last active October 8, 2022 11:04
Stack Overflow minimal content block
! This is a set of filters you can paste into uBlock Origin's "My filters" tab
! to reduce the clutter you see on Stack Overflow,,,,,,,,,,,,,,,,,,,,,,,,
! causes suggested edit approve/reject dialog to be hidden on desktop
verhovsky / funnyman
Last active June 3, 2024 06:48
Amusing `man` commands I've typed
man cat
man time
man date
man cut
man bash
man tree
man unzip
man route
man convert
man echo
verhovsky /
Last active February 7, 2021 13:04
Which modules are imported in the Python standard library most often?
#!/usr/bin/env python3
# This script scans all .py files in cpython/Lib, finds all import statements
# in them and counts out what is imported most often in each top directory
# or file in Lib/ (meaning if some library is imported many times in various
# files in e.g. Lib/http/ , it will only be counted once).
# Clone the CPython repo then put this file in the top level cpython/
# directory and run it:
verhovsky /
Last active October 14, 2022 23:14
Urbit ASCII character names

Hoon is Urbit's high-level programming language. It compiles to Nock, Urbit's low-level language.

Hoon code makes heavy use of non-alphanumeric symbols. Reading off code aloud using the proper names of ASCII symbols is tedious, so we've mapped syllables to symbols:

ace [1 space]       gap [>1 space, nl]  pat @
verhovsky /
Last active October 22, 2018 11:17
a script that uses perceptual hashing (pHash) to find all the duplicated images in a directory and delete them
#!/usr/bin/env python3
find all the duplicated images in the current directory using perceptual hashing and delete them
to install dependencies
$ pip install imagehash Pillow
usage: ./ [directory containing the images]
verhovsky /
Last active February 8, 2024 20:17
Useful short prefix search engines for Chrome. Like adding DuckDuckGo bangs to google.

How to add DuckDuckGo bangs to Google (if you're using Chrome)

Chrome has a feature for defining your own search engines for the omni bar. It's intended for adding search boxes present on other websites, but it accepts arbitrary urls, including modified google search URLs. The URL for a google search query is just, which means if you bind a "search engine" like to "w" you will automatically have the word "wikipedia" added to your search query if you search "w something". You won't even have to type the "!". Here's an example

Go to SettingsManage Search EnginesOther search enginesADD and then

Search engine: wikipedia

Keyword: w

verhovsky /
Last active July 3, 2017 06:41
create bootable usb from .iso file on macOS
# if you want to boot a laptop from a USB drive and you have a file like archlinux-2017.07.01-x86_64.iso
# (and a USB drive plugged in), this is a script to copy the .iso onto the USB drive.
# like UNetbootin but debuggable.
echo "path to .iso?"
read iso_filepath