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 characters
#!/bin/sh | |
# This is /home/starling/service/log/run | |
exec multilog t s1000000 n10 ./main |
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 characters
#!/bin/sh | |
# This is /home/starling/service/run | |
exec 2>&1 | |
echo "Starting..." | |
PORT=22122 | |
IP=0.0.0.0 | |
USER=starling |
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 characters
consumer = SMQueue(:adapter => BarkingIguana::Messaging::SMQueue::StarlingAdapter, :queue => "some.queue.name") | |
consumer.get do |message| | |
puts message.body.inspect | |
# => "Quack quack" | |
end |
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 characters
producer = SMQueue(:adapter => BarkingIguana::Messaging::SMQueue::StarlingAdapter, :queue => "some.queue.name") | |
producer.put "Quack quack" |
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 characters
require 'rubygems' | |
require 'smqueue' | |
require 'starling' | |
require 'yaml' | |
module BarkingIguana | |
module Messaging | |
module SMQueue | |
class StarlingAdapter < ::SMQueue::Adapter | |
class Configuration < ::SMQueue::AdapterConfiguration |
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 characters
s = "http://tinyurl.com/asdf" | |
s.expand_urls! | |
puts s.inspect | |
# => "http://support.microsoft.com/default.aspx?scid=kb;EN-US;158122" |
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 characters
class String | |
include BarkingIguana::ExpandUrl | |
end |
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 characters
require 'net/http' | |
module BarkingIguana | |
module ExpandUrl | |
def expand_urls! | |
ExpandUrl.services.each do |service| | |
gsub!(service[:pattern]) { |match| | |
ExpandUrl.expand($2, service[:host]) || $1 | |
} | |
end |
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 characters
# Install the Aspell port | |
sudo port install aspell | |
# Install the Ruby bindings for Aspell | |
sudo gem install raspell -- --with-opt-dir=/opt/local |
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 characters
raspell.h:6:20: error: aspell.h: No such file or directory |