Created
December 12, 2012 18:55
-
-
Save benatkin/4270517 to your computer and use it in GitHub Desktop.
something to paste into the node.js repl to get access to the clipboard, by running two commands in succession rather than passing a function
This file contains hidden or 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
pb={c:function(s){var p=require('child_process').spawn('pbcopy');p.stdin.write(s);p.stdin.end();},v:function(){o=this;require('child_process').exec('pbpaste',function(e,so,se){o.d=so})}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment