View search_bad_logins.py
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 python3 | |
""" | |
search_bad_logins.py :: Compares a LastPass export to your Bitwarden vault. | |
Python >=3.10, no third party Python libraries / dependencies. | |
Outputs BW logins that may have been compromised in the recent LastPass hack | |
based on matching domain and password. | |
It would probably make sense to cast an even wider net by using something like |
View OpenTerminalToFinderWindow.js
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/osascript -l JavaScript | |
'use strict'; | |
const DEBUG = false; | |
(function () { | |
const terminal = Application("Terminal") | |
// A few seconds to focus the appropriate Finder window |
View devdocs.json
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
{"analyticsConsentAsked":"1","autoInstall":"1","docs":"css/html/http/javascript/dom/bash/docker/flask~2.2/git/gnu_make/gnuplot/go/homebrew/i3/jinja~3.0/jq/liquid/lua~5.4/markdown/matplotlib~3.6/nix/numpy~1.23/pandas~1/pygame/python~3.10/pytorch/rust/scikit_image/scikit_learn/sqlite/statsmodels/svelte/tailwindcss/tensorflow~2.9/vue~3/xslt_xpath"} |
View .gitignore
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
*.img | |
*.img.xz |
View treecount.sh
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
Well, this ended up being easier than I'd expected to implement with coreutils. | |
Wrapped it up into a little script that sorts by count and removes anything with only 1 result (like files). | |
Should be pretty easy to also add in a `du -sh` to get sizes if one wanted. Currently it runs in <2s on that 500,000 line file on my M1 Mac. Sharing in case useful for anyone else. | |
```bash | |
#!/usr/bin/env bash | |
# treecount.sh https://gist.github.com/a7c3b48eb971f662c03e9da17ecb9ea4 | |
# |
View text_scratchpad.sh
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 | |
set -Eeuf -o pipefail | |
shopt -s inherit_errexit | |
log() { | |
echo "$*" > /dev/stderr | |
} | |
err() { |
View build-plugin.sh
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 | |
##### | |
# build-plugin.sh | |
# bash 3.2-compatible convenience script to: | |
# - search by partial name for a plugin in the `QSPLUGINS` subdirectory | |
# (default `./QSPlugins`) | |
# - clean plugin directory | |
# - clean QS directory | |
# - `rm -rf /tmp/QS` |
View rssi.py
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 python3 | |
""" | |
Use the MacOS `airport` utility to get a running average of the WiFi signal | |
strength (RSSI). | |
Python 3.8+, so works with `/usr/bin/python3` on Monterey. | |
""" | |
import os | |
import statistics |
View modify_nix_image.sh
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 | |
# NB: I am no bash pro, so this could be dangerous. | |
# Please read through it and make sure you double check my work. | |
# Assuming nixos image nixos-sd-image-21.05pre-git-aarch64-linux.img and sdcard at /dev/sdx | |
# Example usage: `sudo ./modify_image.sh nixos-sd-image-21.05pre-git-aarch64-linux.img /dev/sdx` | |
# NB: This will overwrite /dev/sdx! | |
set -Eeuf -o pipefail |
View quick replace.applescript
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
using terms from application "Quicksilver" | |
on get direct types | |
return {"NSStringPboardType"} | |
end get direct types | |
on get indirect types | |
return {"NSStringPboardType"} | |
end get indirect types | |
NewerOlder