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 | |
## this is a fork of https://github.com/PeterKaminski09/baskup/blob/master/baskup.sh with some bug fixes | |
# - improve the "Me/Friend" regex so that it only matches what its supposed to doesn't match things at the end of the line | |
# - The NEEDS_MODIFICATION logic was broken so just set it to always true since most everyone is running 10.13+ | |
# - Create "OG_<contact>.txt" files that have the original, pre-regex, content in case the regex destroyed info | |
BACKUP_DIR=./backup |
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
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
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
##### | |
# Temporarily bypass your ad blocking DNS server with this shell function. Automatically restore settings after some number of minutes. | |
##### | |
# This `dnsBypassTmp` zsh function will temporarily bypass your PiHole or DNSCrypt-proxy resolver. | |
# If a site is broken because of a domain you've blocked, this makes it easily to temporarily enabled that and get things working again. | |
# | |
# The only argument is the number of minutes to enable the bypass. Defaults to 2 minutes. | |
# example: | |
# $ dnsBypassTmp 5 | |
# |
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
// Copy this whole snippet to your browser console | |
var dbName = prompt("What's the name of the database to export?") | |
;(async () => { | |
try { | |
var dbExists = await new Promise(resolve => { | |
var request = window.indexedDB.open(dbName) | |
request.onupgradeneeded = e => { | |
e.target.transaction.abort() |
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 is a workaround for https://github.com/jakehilborn/displayplacer/issues/35 and https://github.com/jakehilborn/displayplacer/issues/31 | |
# Displayplacer ignores "scaling:off" and always enabling scaling unless you switch via mode number instead. | |
# It even turns scaling on for non-sense situations like when you're setting the resolution to your | |
# display's physical resolution resulting in a subtle but serious performance hit. | |
function resolutionSwitch() { | |
# check the output of `displayplacer list` and pass in everything after the "mode xx: " of the desired settings shown | |
# if you want "scaling:off", just don't include scaling and pass in '$' at the end to match against the end | |
# examples: |
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
/* | |
********** | |
2024-06-05: | |
On recent versions of macOS (14/Sonoma+), this code no longer works. | |
However I found that this project does still work: https://github.com/damieng/setledsmac/tree/master | |
Though if anyone knows how to fix this script I'd love to learn more. |
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
/// allow-but-log-webassembly.js | |
(function() { | |
var OriginalWebAssembly = WebAssembly; | |
var counter = 0; | |
var logMessage = function(message) { | |
if (counter < 10) { | |
console.log(`CV SAYS: ${message}`); | |
} else if (counter === 10) { | |
console.log('CV SAYS: WebAssembly log messages now suppressed'); | |
counter++; |
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
--- old 2021-04-20 12:52:29.039828036 -0700 | |
+++ new 2021-04-20 12:52:29.792895036 -0700 | |
@@ -1,58 +1,58 @@ | |
Size and Weight | |
Apple TV 4K | |
Height: 1.4 inches (35 mm) | |
Width: 3.9 inches (98 mm) | |
Depth: 3.9 inches (98 mm) | |
Weight: 15 ounces (425 g) | |
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
tell application "System Events" | |
-- Pause syncing | |
click menu bar item 1 of menu bar 2 of application process "Dropbox" | |
click menu item "Pause Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox" | |
delay 2 | |
-- Now re-enable syncing | |
click menu bar item 1 of menu bar 2 of application process "Dropbox" | |
click menu item "Resume Syncing" of menu 1 of menu bar item 1 of menu bar 2 of application process "Dropbox" | |
end tell |
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
## 2020-05-16: Changed `echo` to `printf` so that backslashes are not interpretted by echo | |
## and so that CUTBUFFER shows up exactly in the pasteboard without modification | |
pb-kill-line () { | |
zle kill-line | |
printf '%s' $CUTBUFFER | pbcopy | |
} | |
pb-kill-whole-line () { | |
zle kill-whole-line |