Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@huangyg11
huangyg11 / waitFor.js
Last active August 6, 2019 08:16 — forked from mjblay/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content. Forked for use without JQuery.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (element) {
element.text ("This comment changed by waitForKeyElements().");
@huangyg11
huangyg11 / remote-copy.md
Last active January 16, 2017 07:20 — forked from burke/remotepaste.md
This fork sets up keybindings in tmux that allow you to copy to your OS X clipboard from tmux running inside an SSH connection to a remote host. In tmux copy mode, hit enter to copy.

Local (OS X) Side

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>localhost.pbcopy</string>