Skip to content

Instantly share code, notes, and snippets.

verhovsky / minimal-stackoverflow-ui.txt
Last active Oct 8, 2022
Stack Overflow minimal content block
View minimal-stackoverflow-ui.txt
! 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 / funny_man
Last active Oct 24, 2022
Amusing `man` commands I've typed
View funny_man
man cat
man time
man date
man unzip
man bash
man tree
man route
man convert
man echo
verhovsky /
Last active Feb 7, 2021
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 Oct 14, 2022
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 Oct 22, 2018
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 Dec 15, 2017
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 Jul 3, 2017
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