Skip to content

Instantly share code, notes, and snippets.

View calebmpeterson's full-sized avatar
✝️
Soli Deo Gloria

Caleb Peterson calebmpeterson

✝️
Soli Deo Gloria
View GitHub Profile
// Copy.js
module.exports = () => {
keyboard.pressKey(Key.LeftSuper, Key.C);
keyboard.releaseKey(Key.LeftSuper, Key.C);
};
// Paste.js
module.exports = () => {
keyboard.pressKey(Key.LeftSuper, Key.V);
keyboard.releaseKey(Key.LeftSuper, Key.V);
# Setup a fresh macOS system
# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
# install iTerm2
brew install iterm2
# install zsh
brew install zsh
@calebmpeterson
calebmpeterson / force-allow-password-pasting.js
Created February 24, 2024 14:23
JavaScript snippet to force allowing of password pasting on websites.
var allowPaste = function(e) {
e.stopImmediatePropagation();
console.log("Free the paste!")
return true;
};
document.addEventListener('paste', allowPaste, true);
@calebmpeterson
calebmpeterson / find-in-files.md
Last active December 29, 2021 21:26
Snippets

To find text/pattern in a sub-directory tree using grep:

grep -rlw "thing" sub/dir

@calebmpeterson
calebmpeterson / .inputrc
Last active August 29, 2015 13:56
.inputrc
# Ctrl+Left/Right to move by whole words
"\e[1;5D": backward-word
"\e[1;5C": forward-word
# Ctrl+Backspace/Delete to delete whole words
"\d": backward-kill-word
"\e[3;5~": kill-word
# Ctrl+Shift+Backspace/Delete to delete to start/end of the line
"\e\d": backward-kill-line