This file contains 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 characters
sudo yum update # -yes? | |
sudo yum groupinstall "Development Tools" | |
sudo yum install openssl-devel htop | |
mkdir install | |
cd install | |
wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.41.tar.gz | |
tar -xvzf pure-ftpd-1.0.41.tar.gz | |
cd pure-ftpd-* | |
./configure --with-tls --with-ftpwho --with-puredb --without-pam | |
make |
This file contains 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 characters
class ApiNewRelicInstrumenter < Grape::Middleware::Base | |
include NewRelic::Agent::Instrumentation::ControllerInstrumentation | |
def call_with_newrelic(&block) | |
trace_options = { | |
:category => :rack, | |
:path => "#{route_path}\##{route_method}", | |
:request => request | |
} |
This file contains 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 characters
require 'rubygems' | |
require 'eventmachine' | |
require 'eventmachine-tail' | |
class Tailer < EventMachine::FileTail | |
def initialize(path, startpos = -1) | |
super(path, startpos) | |
@buffer = BufferedTokenizer.new | |
end | |
This file contains 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 characters
require 'rubygems' | |
require 'dripdrop/node' | |
Thread.abort_on_exception = true | |
DripDrop::Node.new do | |
route :exposures_sub, :zmq_subscribe, 'tcp://10.224.82.225:2200', :connect | |
exposures_sub.on_recv do |message| | |
line = message.body |
This file contains 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 characters
require 'rubygems' | |
require 'dripdrop/node' | |
require 'eventmachine-tail' | |
Thread.abort_on_exception = true | |
class Tailer < EventMachine::FileTail | |
def initialize(zmq_queue, path, startpos = -1) | |
super(path, startpos) | |
@zmq_queue = zmq_queue |