Hampton Catlin
Hampton Catlin is the inventor of Sass, a CSS generating language, and the Haml markup language
He is the original creator of Wikipedia Mobile (m.wikipedia.org) and is also the creator of several successful iPhone applications including Dictionary!
Hampton is currently building crazy new technologies to mobilize the web at Moovweb.
Macruby Clipboard / Pasteboard
I am currently working on a macruby app for OS X and I needed to read off the Clipboard (aka “Pasteboard” in OS X parlance). At first, I started reading the nutty Cocoa native implementation… but it did way more than I needed and was far more complex than I wanted. I found this little gem though and thought I’d share it with you. We can do it easily in the Ruby half of macruby!
IO.popen('pbpaste') do |clipboard|
puts clipboard.read
end
If you want to write:
IO.popen('pbcopy', 'w').print "Text to go on clipboard"
Simplez!
Comments