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
[redshift] | |
Description = ODBC for Redshift | |
Driver = PostgreSQL | |
Database = dbname | |
Servername = servername.redshift.amazonaws.com | |
Port = 5439 | |
Debug = 1 |
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
{:available_on=>Tue, 13 May 2014, :display_total_price=>false, :hotel_id=>1255, :id=>1332736, :room_type_id=>1, :sold_out=>false, :sold_out_at=>nil, :available_nights=>[{:num_nights=>1, :num_remaining=>1, :customer_net_price=>300, :customer_tax_amount=>49, :customer_gross_price=>349, :customer_net_price_average=>300, :customer_tax_amount_average=>49, :customer_gross_price_average=>349, :customer_regular_net_price=>nil, :customer_regular_tax_amount=>nil, :customer_regular_gross_price=>nil}, {:num_nights=>2, :num_remaining=>1, :customer_net_price=>300, :customer_tax_amount=>49, :customer_gross_price=>349, :customer_net_price_average=>150, :customer_tax_amount_average=>24, :customer_gross_price_average=>174, :customer_regular_net_price=>nil, :customer_regular_tax_amount=>nil, :customer_regular_gross_price=>nil}, {:num_nights=>3, :num_remaining=>1, :customer_net_price=>300, :customer_tax_amount=>49, :customer_gross_price=>349, :customer_net_price_average=>100, :customer_tax_amount_average=>16, :customer_gross_pri |
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
<DocuSignEnvelopeInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.net/API/3.0"> | |
<EnvelopeStatus> | |
<EnvelopeID>fdsafdsa</EnvelopeID> | |
</EnvelopeStatus> | |
</DocuSignEnvelopeInformation> |
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
retired_hosts = %w{ip-10-30-154-136 ip-11-30-159-135} | |
Resque::workers.map do |worker| | |
host = worker.id.split(":").first | |
if retired_hosts.include? host | |
worker.unregister_worker | |
end | |
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
Before: | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 3276 | 2474 | 50 | 249 | 4 | 7 | | |
| Helpers | 329 | 268 | 0 | 36 | 0 | 5 | | |
| Models | 5594 | 4084 | 73 | 462 | 6 | 6 | | |
| Libraries | 1293 | 1057 | 21 | 121 | 5 | 6 | | |
| Model specs | 5784 | 4553 | 0 | 34 | 0 | 131 | |
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
puts "ran with trace" if Rake.application.options.trace == true |
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 "aws-sdk" | |
class Dynamo | |
attr_accessor :attributes | |
def initialize(hash) | |
raise ArgumentError, "argument passed to .new must be a Hash" unless hash.is_a? Hash | |
raise ArgumentError, "hash must contain key :#{self.class.hash_key}" unless hash.has_key? self.class.hash_key.to_sym | |
raise ArgumentError, "hash must contain key :#{self.class.range_key}" unless self.class.has_range_key? && hash.has_key?(self.class.range_key.to_sym) | |
@attributes = {} |
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..100).each do |num| | |
str = "" | |
str << "Fizz" if num % 3 == 0 | |
str << "Buzz" if num % 5 == 0 | |
str = num if str.empty? | |
print str | |
print ", " if num < 100 |
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
$(function(){ | |
Movie = Backbone.Model; | |
var Movies = Backbone.Collection.extend({ | |
model: Movie, | |
url: '/movies' | |
}); | |
MovieController = Backbone.Controller.extend({ | |
routes: { |