-
-
Save ScheerMT/3f5ed1010b2573e5dc26 to your computer and use it in GitHub Desktop.
Revisions
-
leehambley renamed this gist
Mar 18, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ #!/usr/bin/env ruby # # vim: set ft=ruby -
leehambley created this gist
Mar 18, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ✗ cat ../smithy/bin/statsd #!/usr/bin/env ruby # # vim: set ft=ruby # require 'socket' require 'term/ansicolor' include Term::ANSIColor $stdout.sync = true c = Term::ANSIColor s = UDPSocket.new s.bind(nil, 8125) while blob = s.recvfrom(1024) metric, value = blob.first.split(':') puts "StatsD Metric: #{c.blue(metric)} #{c.green(value)}" end