Skip to content

Instantly share code, notes, and snippets.

@aki017
Last active December 14, 2015 15:48
Show Gist options
  • Save aki017/5110217 to your computer and use it in GitHub Desktop.
Save aki017/5110217 to your computer and use it in GitHub Desktop.
寿司
#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
require "SocketIO"
client = SocketIO.connect("http://54.249.246.187:3000") do
before_start do
on_event('message'){ |data|
puts "%20s%5.1f|%d(%d)" % [ ("*"*(data[0]["value"]/5)).ljust(40) , data[0]["value"], data[0]["watcher"] , data[0]["count"]||0]
}
end
end
loop do
sleep 10
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment