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
default: &default | |
adapter: postgresql | |
pool: 5 | |
timeout: 5000 | |
host: database | |
username: <%= ENV['POSTGRES_USER'] %> | |
password: <%= ENV['POSTGRES_PASSWORD'] %> | |
development: | |
<<: *default |
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
POSTGRES_USER=postgres | |
POSTGRES_PASSWORD=password4postgres |
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: | |
database: | |
image: postgres | |
volumes: | |
- ./data/pgdata:/pgdata | |
env_file: | |
- '.env' | |
web: | |
links: |
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
FROM ruby:2.3-slim | |
RUN apt-get update \ | |
&& apt-get install -qq -y --no-install-recommends \ | |
build-essential \ | |
nodejs \ | |
libpq-dev \ | |
git \ | |
tzdata \ | |
libxml2-dev \ |
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, 2], [3, 4] ].map( ([a, b]) => a + b ); |
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 CruisesCore | |
module Models | |
module Article | |
module Elasticsearch | |
extend ActiveSupport::Concern | |
included do | |
include ::Elasticsearch::Model | |
index_name "cruises-#{Rails.env}" |
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
{ | |
"{": { | |
"\"request\":": {}, | |
"{": { | |
"\"type\":\"ship\",": {}, | |
"\"slug\":\"norwegian-breakaway\",": {}, | |
"\"api\":\"api\",": {}, | |
"\"key\":\"abc123\"": {}, | |
"\"object\":": {}, | |
"{": { |
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
#seller-name { | |
color: #34495e; | |
&:hover { | |
cursor: help; | |
text-decoration: none; | |
} | |
/* pseudo element to put after our link */ | |
&:after { |
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
begin; | |
savepoint insert_save_point; | |
insert into params values('email', 'lol@lol.pt'); | |
rollback to insert_save_point; | |
update params set value = 'lol@lol.pt' where name = 'email'; | |
commit; |
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
var mediaQueryListElement = window.matchMedia("all and (max-width: 990px)"); | |
function loadjQueryMobile() { | |
// listner to this callback very carefully, we should load this script only once | |
mediaQueryListElement.removeListener(loadjQueryMobile); | |
var helper_script = $('#holder-element').data('helper'); | |
if (helper_script) { | |
$.getScript(helper_script) |