June 2009

Copy'n'Paste

Mac:

# stick in .irbrc
def copy(str)
  IO.popen(pbcopy, w) { |f| f << str.to_s }
end

def paste
  `pbpaste`
end

def ep
  eval(paste)
end
Linux with xclip (thanks Bjørn Arild Mæland):

def copy(str)
  IO.popen('xclip -i', 'w') { |f| f << str.to_s }
end
 
def paste
  `xclip -o`
end

View Comments

May 2009

GitHub.js

March 2009

Nokogirl

February 2009

Change

January 2009

Tailin' Ruby

December 2008

Copy Folders to a Branch

October 2008

Morse.rb

September 2008

It's a Gash, Gash, Gash

August 2008

Tribute

August 2008

SuperIO

June 2008

Ruby Fishy Edition

April 2008

Moving to Nginx

April 2008

Thank You!

March 2008

RE: Haiku.rb

March 2008

Haiku.rb

February 2008

A Better to_hash

February 2008

A Trip into Random

February 2008

Introducing Gemify