This is a complete naive comparison, don't take it for granted!
Docker for MAC: Version 18.06.0-ce-mac70 (26399)
Image: postgres:9.4.10-alpine
Postgres did a sequence scan for both queries with and without indexes.
docker run \ | |
-v ${PWD}/config:/snowplow/config \ | |
-p 8000:8000 \ | |
-e 'SP_JAVA_OPTS=-Xms512m -Xmx512m' \ | |
-e 'GOOGLE_APPLICATION_CREDENTIALS=/snowplow/config/gcp-key.json' \ | |
snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-google-pubsub:0.13.0 \ | |
--config /snowplow/config/config.hocon |
<table class="table"> | |
<caption>Optional table caption.</caption> | |
<thead> | |
<tr> | |
<th>#</th> | |
<th>First Name</th> | |
<th>Last Name</th> | |
<th>Username</th> | |
</tr> | |
</thead> |
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Solarized Color Scheme/Solarized (dark).tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", |
class BaseUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
def store_dir | |
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" | |
end | |
def extension_white_list | |
%w(jpg jpeg gif png) | |
end |
class Device | |
CONSUMPTIONS = { | |
"1" => { method_id: 2, value: 20 }, | |
"2" => { method_id: 6, value: 0.001 }, | |
"3" => { method_id: 7, value: 30 } | |
} | |
end | |
puts Device::CONSUMPTIONS["2"][:method_id] # => 6 | |
puts Device::CONSUMPTIONS["2"][:value] # => 0.001 |
def products_path | |
"/products" | |
end | |
def product_path(id) | |
"/products/#{id}" | |
end | |
def dic | |
{ |
module Foo | |
def self.included(base) | |
base.extend(ClassMethods) | |
# alternative | |
def base.class_name | |
"class method name" | |
end | |
end |
PagSeguroDirectPayment.setSessionId('session_id from backend'); | |
PagSeguroDirectPayment.getInstallments({ | |
amount: 50.00, | |
brand: "visa", | |
success: function(response) { | |
console.log("installments:"); | |
console.log(response); | |
}, | |
error: function(response) { |