Skip to content

Instantly share code, notes, and snippets.

@jurriaan
Forked from koenbollen/cbs.go
Last active November 1, 2015 11:32
Show Gist options
  • Save jurriaan/0d754cd2b59ceddf2024 to your computer and use it in GitHub Desktop.
Save jurriaan/0d754cd2b59ceddf2024 to your computer and use it in GitHub Desktop.
ClipBoardServer (in Ruby, for OSX)
require 'webrick'
server = WEBrick::HTTPServer.new(Port: 1234)
server.mount_proc('/') { |req, res| IO.popen('pbcopy', 'w') { |io| io.write(req.body) } }
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment