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
#! /usr/bin/ruby | |
begin | |
require 'net/http' | |
require 'json' | |
rescue LoadError | |
puts 'Required dependencies are not installed. Please install the following:' | |
puts '\'net/http\', \'json\'' | |
puts 'Then try again.' | |
exit |
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
Largest 1000 Cities in America | |
2017 popuation data - Biggest US Cities By Population | |
rank,city,state,population,2000-2016 growth | |
1,New York,New York,8537673,6.5% | |
2,Los Angeles,California,3976322,7.3% | |
3,Chicago,Illinois,2704958,-6.5% | |
4,Houston,Texas,2303482,16.4% | |
5,Phoenix,Arizona,1615017,21.7% |
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
root@psra-haproxy:~# /etc/init.d/bprobe start | |
* Starting Boundary flow meter bprobe 01/Nov/2012 15:30:29 [nprobe.c:1576] Resolving IP address for "collector.boundary.com"... | |
01/Nov/2012 15:30:29 [nprobe.c:1598] collector.boundary.com resolved to 206.80.62.21 | |
01/Nov/2012 15:30:29 [nprobe.c:2096] Exporting from: 10.1.2.16 | |
01/Nov/2012 15:30:29 [nprobe.c:1678] Loading certificate: /etc/bprobe/cert.pem | |
01/Nov/2012 15:30:29 [nprobe.c:1688] Loading private key /etc/bprobe/key.pem | |
01/Nov/2012 15:30:29 [nprobe.c:1698] Loading CA /etc/bprobe/ca.pem | |
01/Nov/2012 15:30:29 [nprobe.c:1708] TLS initialized | |
01/Nov/2012 15:30:29 [nprobe.c:1756] TLS connected | |
01/Nov/2012 15:30:29 [nprobe.c:2123] Exporting flows towards tls://collector.boundary.com:4740 using TLS |
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
1) Error: | |
test_counter_operations(TestExample): | |
NoMethodError: undefined method `key' for #<Riak::RContent:0x007fde03b79420> | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/document/finders.rb:121:in `block in instantiate' | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/document/finders.rb:120:in `tap' | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/document/finders.rb:120:in `instantiate' | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/attribute_methods/dirty.rb:13:in `instantiate' | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/conflict/resolver.rb:53:in `document' | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/bundler/gems/ripple-c68106a8a431/lib/ripple/conflict/basic_resolver.rb:4:in `documen |
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
# somewhere above; like in a template definition | |
notifies :restart, resources(:service => "redis-server") | |
# later on in the same recipe | |
service "redis-server" do | |
supports :start => true, :stop => true, :restart => true, :"force-reload" => true | |
action [ :enable, :start ] | |
end | |
we get an error that says something about the 'redis-server' service not yet defined (as it is referenced in the template). |
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
context "multi-json exception" do | |
setup do | |
@encryptor = Ripple::Contrib::EncryptedSerializer.new(OpenSSL::Cipher.new("AES-256-CBC")) | |
@encryptor.key = 'mhealth123456789101112mhealth123' | |
end | |
should "decrypt using aes encryptor" do | |
input = File.read("test/fixtures/test_document/v2_error.txt") | |
input = JSON.parse(input) | |
expected = YAML.dump(input) |
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 'riak' | |
c = Riak::Client.new(:nodes => [{:host => 'localhost', :http_port => 8091}]) | |
b = c.bucket('foo') | |
ro1 = b.get_or_new('one') | |
ro1.raw_data = "Hello, world!" | |
ro1.content_type = "text/html" | |
ro1.indexes['date_bin'] << '2012-07-13' | |
ro1.store |
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
[randy|Bashos-MacBook-Pro|1.9.3p125 (dev) ✗] ~/Documents/dev/views/mhealth/mhealth $ bundle exec rake | |
/Users/randy/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config. | |
(in /Users/randy/Documents/dev/views/mhealth/mhealth) | |
Pending scenario: the api doesn't credentials for the access token request (in test/integration/api_test.rb:44) | |
Pending scenario: the api sends wrong credentials for the access token request (in test/integration/api_test.rb:49) | |
Pending scenario: user denies authorization request (in test/integration/authorization_test.rb:157) | |
Pending scenario: authorization request has state (in test/integration/authorization_test.rb:160) | |
Pending scenario: authorization request redirect_uri has a query string (in test/integration/authorization_test.rb:163) | |
Pending scenario: authorization request has state & redirect_uri w/ query string (in test/integration/authorization_test.rb:166) | |
Pending scenario: user authorizes |
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
module Ripple | |
module Document | |
module Finders | |
module ClassMethods | |
def find_by(key, query) | |
find(find_keys_by(key, query)).compact | |
end | |
def find_keys_by(key, query) | |
if key == "$key" || key == "$bucket" |
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
Test Case Steps | |
--------------- | |
1. OS X 10.7.3 - Fresh Install | |
2. Install XCode 4.3 | |
3. Install Comand Line Tools for XCode | |
a. XCode -> Open Developer Tool -> More Developer Tools -> Command Line Tools.dmg | |
4. Install Erlang viw SpawnGrid / Kerl | |
a. add kerl to path | |
b. kerl build R14B04 r14b04 |
NewerOlder