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 'cassandra' | |
cluster = Cassandra.cluster(port: 9042, consistency: :local_quorum) | |
session = cluster.connect("invoice") | |
# Simple migration script moving one tables data to another with different pk/cks | |
create_table = <<-TABLE_CQL | |
CREATE TABLE IF NOT EXISTS draft_invoices ( | |
invoice_id UUID, |
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
Running node v5.11.0 (npm v3.8.6) | |
Server started at http://0.0.0.0:3000 | |
Hapi server running at: http://0.0.0.0:3000 | |
There was a problem in file and it has been destroyed. |
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
I, [2016-06-08T09:21:32.627029 #1] INFO -- : {"method":"GET","path":"/documentation/1.0/requests/show.html","format":"html","controller":"apipie/apipies","action":"index","status":200,"duration":1077.15,"view":362.97,"db":0.0,"@timestamp":"2016-06-08T09:21:32.619Z","@version":"1","message":"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)"} |
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
input { | |
file { | |
type => "ruby-logger" | |
path => "/logs/development.log" | |
} | |
} | |
filter{ | |
if [type] == "ruby-logger" { | |
grok { |
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
I, [2016-06-07T15:25:12.644074 #1] INFO -- : {"method":"GET","path":"/documentation/1.0.html","format":"html","controller":"apipie/apipies","action":"index","status":200,"duration":295.64,"view":100.37,"db":0.0,"@timestamp":"2016-06-07T15:25:12.641Z","@version":"1","message":"[200] GET /documentation/1.0.html (apipie/apipies#index)"} |
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
version: '2' | |
services: | |
db: | |
image: postgres | |
redis: | |
extends: | |
file: common.yml | |
service: redis | |
rabbitmq: | |
image: gavinmroy/alpine-rabbitmq |
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 ConvertIndifferentHashToRubyHash | |
# Recursively steps through an ActiveSupport::HashWithSatanAccess object | |
# And converts all Indifferent Access objects to ruby hashes. Including those | |
# nested and nested in arrays | |
attr_accessor :indifferent_hash | |
def initialize(hash_with_indifferent_access) | |
self.indifferent_hash = hash_with_indifferent_access | |
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
_.extend(Backbone.Model.prototype, { | |
// By default, rails expects model params to be wrapped in a nested params hash | |
// https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/params_wrapper.rb | |
_paramsWrapper : function() { | |
return this.paramsWrapper; | |
} | |
}); | |
// Alias Backbone.sync method to inject Rails specific |