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 -o errexit | |
set -o nounset | |
set -o pipefail | |
if [[ "${DEBUG-0}" == "1" ]]; then | |
set -o xtrace | |
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
function heic () { | |
for f in *.HEIC | |
do | |
[[ -e $f ]] || { echo "Error: File $f does not exist"; continue; } | |
output_file=${f:t:r}.jpg | |
/opt/homebrew/bin/convert -format jpg "$f" "$output_file" && \ | |
/opt/homebrew/bin/trash "$f" || \ | |
echo "Error: Conversion with convert failed for $f" | |
original_size=$(du -h "$output_file" | cut -f1) | |
tmp_file=$(mktemp /tmp/moz.XXXXXX.jpg) |
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
alias brew_cleanup="brew update && brew outdated --verbose && brew upgrade && brew cleanup -s --prune=all && brew cleanup && brew autoremove --dry-run" | |
# brew autoremove |
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
ssh-keygen -R github.com | |
mv ~/.ssh/known_hosts.old /tmp/ | |
http https://api.github.com/meta | jq -r '.ssh_keys[] | ("github.com " + .)' >> ~/.ssh/known_hosts | |
ssh -vT git@github.com |
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 Google Link Cleaner | |
// @description Prevents Google from being informed about each click on a result link. | |
// @include http://www.google.*/ | |
// @include http://www.google.*/?* | |
// @include http://www.google.*/#* | |
// @include http://www.google.*/search* | |
// @include http://www.google.*/webhp* | |
// @include https://www.google.*/ | |
// @include https://www.google.*/?* |
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
for (var i = 0; i < document.links.length; i++) { | |
document.links[i].removeAttribute('onmousedown'); | |
} |
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
javascript:(function()%7Bfor%20(var%20i%20%3D%200%3B%20i%20%3C%20document.links.length%3B%20i%2B%2B)%20%7Bdocument.links%5Bi%5D.removeAttribute('onmousedown')%3B%7D%7D)() |
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
javascript:prompt("URL and title:", document.location.href +' ( '+ document.title+' )');void(0) |
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
javascript:prompt("URL and title:", '['+document.title +']' +'('+document.location.href+')');void(0) |
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
--- This will take a url on your clipboard, and use google to shorten it | |
--- create a new text expander item, set to applescript and paste this in. | |
--- set your google developer api key : | |
set myKey to "XXXXXXXXXXXXXXXXXXXXXXXXXX" | |
set the ClipURL to (the clipboard as string) | |
ignoring case | |
if ((characters 1 through 4 of ClipURL as string) is not "http") then |
NewerOlder