Skip to content

Instantly share code, notes, and snippets.

@benatkin
Created December 12, 2012 18:55
Show Gist options
  • Save benatkin/4270517 to your computer and use it in GitHub Desktop.
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
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