This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pkgutil --packages \ | |
| if [[ "$1" ]]; then grep -i "$1"; else cat; fi \ | |
| perl -nE ' | |
#line 5 "pkgutil-list-files" | |
chomp; | |
print STDERR "# scanning $_…\n"; | |
$location = `pkgutil --pkg-info $_`; | |
$location =~ s/.*location: (.*?)\n.*/$1/s; | |
print STDERR "# location: $1\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## | |
## Accept arguments from popular package management tools (except Homebrew) | |
## and just do the right thing, based on the platform. | |
## | |
## Created out of frustration at typing `yum` on Macs and `port` on Linux | |
## boxes, and `apt` on RHEL/CentOS boxes all too often. | |
## | |
## Author: Kevin Ernst <ernstki -at- mail.uc.edu> | |
## Date: 16 Januar 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## Simple wrapper script for Apache tika | |
## | |
## Usage: download the latest `tika-app*.jar` from [1] to your ~/bin | |
## and copy this script alongside. Make executable with | |
## | |
## chmod a+x ~/bin/tika` | |
## | |
## Test with `tika --help`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
## | |
## Easily disable fonts that aren't for your language, or language-specific | |
## variants from large font families like Noto -- WITHOUT uninstalling them | |
## | |
## Authors: Kevin Ernst <ernstki -at- mail.uc.edu>, @wdoekes | |
## License: MIT or CC-BY-SA-4.0, at your option | |
## Source: https://gist.github.com/ernstki/2ae279ad89888e4099c9852bf0ba5d11 | |
## | |
## Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## fc-json - print output of 'fc-cat' as valid JSON | |
## | |
## Usage: | |
## $ fc-json | jq -SC . | |
## | |
## Author: Kevin Ernst <ernstki -at- mail.uc.edu> | |
## Date: 2 September 2023 | |
## License: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# h/t: https://stackoverflow.com/a/28776166 | |
if ( return 0 2>/dev/null ); then sourced=1; else sourced=0; fi | |
# fail on unset variables unless sourced from another script | |
if (( !sourced )); then set -u; fi | |
# set TRACE=1 in the environment to enable execution tracing | |
if (( ${TRACE:-} )); then set -x; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
## | |
## Parse ATTENDEEs from iCalendar (.ics) files | |
## | |
## Author: Kevin Ernst <ernstki -at- mail.uc.edu> | |
## Date: 26 July 2021 | |
## Source: https://gist.github.com/ernstki/6d17ab342aa6a1a2de788b487e7fb29b | |
## License: WTFPL | |
## | |
## Hint: Pipe into `column -ts$'\t'` for a visually-aligned table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# intended for use with https://github.com/erichs/composure | |
# requires ImageMagick's 'convert' and GNU Parallel | |
# source: https://gist.github.com/ernstki/495ff1a60509e0b771f0d65740de1a19/edit | |
convertto () | |
{ | |
author 'Kevin Ernst' | |
about 'Convert arguments to another image format based on extension' | |
example "$ convertto jpg *.heic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Copy Meetup full-res URLs | |
// @namespace https://gist.github.com/ernstki | |
// @version 1.0 | |
// @description Copy URLs of full-resolution images from Meetup event photos page to the clipboard | |
// @author Kevin Ernst | |
// @match https://www.meetup.com/* | |
// @icon https://icons.duckduckgo.com/ip2/meetup.com.ico | |
// @grant GM_setClipboard | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! ref: https://github.com/gorhill/uBlock/wiki/Procedural-cosmetic-filters | |
! Stack Overflow sites | |
stackexchange.com##.js-consent-banner | |
stackexchange.com##.js-dismissable-hero | |
stackexchange.com##.mb16.s-anchors__grayscale.s-anchors.s-sidebarwidget__yellow.s-sidebarwidget | |
stackexchange.com##.left-sidebar | |
! https://gitlab.com | |
gitlab.com##.js-autodevops-banner |