Skip to content

Instantly share code, notes, and snippets.

@stepahn
Created April 8, 2009 14:48
Show Gist options
  • Save stepahn/91808 to your computer and use it in GitHub Desktop.
Save stepahn/91808 to your computer and use it in GitHub Desktop.
require 'socket'
server = TCPServer.open(9999)
loop do
Thread.start(server.accept) do |client|
puts "connected #{client.inspect}"
begin
while say = client.readline.strip
puts "largetype: #{say}"
`osascript -e 'tell application "Quicksilver"
show large type "#{say}"
end tell'`
end
rescue EOFError, Errno::ECONNRESET
end
puts "closing connection"
client.close
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment