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 'pp' | |
| require 'aws-sdk' | |
| require 'logger' | |
| module RAWS | |
| class Metrics | |
| def initialize | |
| config_path = '.riotaws.yml' | |
| AWS.config({ | |
| :access_key_id => 'A...', |
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
| bob = "pizza" | |
| if false | |
| puts bob | |
| else bob = "dog" | |
| puts bob | |
| end | |
| puts "done" |
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
| source :rubygems | |
| gem 'sinatra' | |
| gem 'thor' | |
| gem 'mongo' | |
| gem 'json' |
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
| Listen 192.168.1.1:443 | |
| LoadModule ssl_module modules/mod_ssl.so | |
| SSLPassPhraseDialog builtin | |
| AcceptMutex flock | |
| SSLSessionCache shmcb:/var/cache/httpd/mod_ssl/ssl_scache(512000) | |
| SSLSessionCacheTimeout 300 | |
| SSLMutex default | |
| SSLRandomSeed startup /dev/urandom 256 |
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
| post '/updates' do | |
| uri = URI.parse("http://localhost:8901/send") | |
| Net::HTTP.post_form(uri, | |
| { "data" => "Hello room!", "channel" => "chat-room-5"}) | |
| "ok" | |
| 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
| chloe.connect(function () { | |
| chloe.subscribe('chat-room-5', function (message) { | |
| $("#messages").prepend("<li>" + message + "</li>") | |
| }); | |
| }); |
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
| =ERROR REPORT==== 13-Jun-2011::14:49:44 === | |
| Yaws process died: {noproc, | |
| {gen_server,call, | |
| [yaws_sendfile, | |
| {send,40, | |
| <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,62,0,0,0,40, | |
| 47,104,111,109,101,47,117,98,117,110,116, | |
| 117,47,99,104,108,111,101,47,114,101,108,47, | |
| 99,104,108,111,101,45,48,46,48,46,51,98,101, | |
| 116,97,47,112,117,98,108,105,99,47,99,104, |
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
| -module(basic). | |
| -export([say_hello/0, | |
| make_hello/0, | |
| match_me/1 | |
| ]). | |
| say_hello() -> | |
| io:fwrite("Ohai!\n"). | |
| make_hello() -> |
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
| (in /Users/trotter/code/my-open-source/newflow) | |
| ......................................FFFFFFF | |
| 1) | |
| 'A workflow A workflow with no states should raise an error on creation' FAILED | |
| expected Newflow::InvalidStateDefinitionError, got #<ArgumentError: wrong number of arguments (1 for 0)> | |
| spec/newflow_workflow_spec.rb:17:in `block (3 levels) in <top (required)>' | |
| 2) | |
| 'A workflow A workflow with one state should raise an error on creation' FAILED |
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
| This is how ruby does things | |
| ruby-1.9.2-p180 :007 > def variables(stuff) | |
| ruby-1.9.2-p180 :008?> puts stuff | |
| ruby-1.9.2-p180 :009?> end | |
| => nil | |
| ruby-1.9.2-p180 :010 > variables(:hi => "there") | |
| {:hi=>"there"} | |
| => nil | |
| ruby-1.9.2-p180 :011 > variables (:hi => "there") |
NewerOlder