This file contains hidden or 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
{ | |
"id":"cccd0eb3-2b9b-46b5-8f50-328846ba2bad", | |
"data":{ | |
"error_type":"Guest Already Arrived", | |
"problem_description":null, | |
"guest_message":null | |
}, | |
"created_at":"2015-06-06T03:00:08.475-07:00", | |
"status":"delivered", | |
"type":"Messages::CheckInError", |
This file contains hidden or 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
{ | |
"id":"c9186f95-8e3c-4c61-a23b-f70cadb0b9b2", | |
"data":{ | |
"check_in_time":"2015-06-05T03:00:00Z", | |
"room_number":"113", | |
"granted_room_upgrade":true, | |
"additional_details":null | |
}, | |
"created_at":"2015-06-04T09:36:28.502-07:00", | |
"status":"delivered", |
This file contains hidden or 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
{ | |
"id":"06fde765-4526-46eb-ba1c-af109d7b9cc4", | |
"data":{ | |
"message":"Welcome to Hotel Kabuki." | |
}, | |
"created_at":"2015-05-29T10:58:37.852-07:00", | |
"status":"delivered", | |
"type":"Messages::AdHoc", | |
"category":"ad-hoc", | |
"compiled_template":{ |
This file contains hidden or 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
#!/bin/bash | |
# source rvm and .rvmrc if present | |
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" | |
[ -s "$PWD/.rvmrc" ] && . "$PWD/.rvmrc" | |
should_precompile=0 | |
# check if anything changed in app/assets | |
if git diff-index --name-only HEAD | egrep '^app/assets' >/dev/null ; then |
This file contains hidden or 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
Rake::Task["assets:clean"].enhance do | |
return "can't run in dev" if Rails.env.development? | |
puts 'Running my assets:clean extension.' | |
manifest = Sprockets::Rails::Task.new(Rails.application).manifest | |
["#{Dir.pwd}/public/assets/"].each do |dir_path| | |
records = Dir.glob("#{dir_path}**/*") | |
records.each do |f| | |
if f =~ /.*.png$/ or | |
f =~ /.*.jpg$/ or | |
f =~ /.*.gif$/ or |
This file contains hidden or 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
CREATE TEMP TABLE reservations ( | |
reservation_id serial | |
, start_on timestamptz NOT NULL | |
, time_zone text); -- we don't need this | |
INSERT INTO reservations (start_on, time_zone) VALUES | |
('2014-04-11 00:00+10', 'Australia/Sydney') -- start date 4/11, use midnight in Sydney | |
, ('2014-04-12 00:00+10', 'Australia/Sydney') -- start date 4/12, use midnight in Sydney | |
, ('2014-04-11 00:00-07', 'America/Los_Angeles') -- start date 4/11, use midnight in SF | |
, ('2014-04-12 00:00-07', 'America/Los_Angeles'); -- start date 4/12, use midnight in SF |
This file contains hidden or 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
d1k52r595ne826=> EXPLAIN SELECT "reservations".* FROM "reservations" WHERE (arrival_day && tsrange('2014-04-11 18:42:18.813381', NULL, '[]')); | |
QUERY PLAN | |
----------------------------------------------------------------------- | |
Seq Scan on reservations (cost=0.00..5733.91 rows=14230 width=1038) | |
Filter: (arrival_day && '["2014-04-11 18:42:18.813381",)'::tsrange) | |
(2 rows) | |
d1k52r595ne826=> EXPLAIN SELECT "reservations".* FROM "reservations" WHERE (arrival_day && tsrange('2014-04-11 18:42:18.813381', '2014-04-15 18:42:18.813381', '[]')); | |
QUERY PLAN | |
------------------------------------------------------------------------------------------------------------- |
This file contains hidden or 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 ClientSideValidations::Middleware | |
class PasswordStrength < ClientSideValidations::Middleware::Base | |
require 'strong_password' | |
def response | |
min_entropy = StrongPassword::StrengthChecker::BASE_ENTROPY | |
if request.params['min_entropy'] | |
min_entropy = request.params['min_entropy'].to_f | |
end | |
entropy = StrongPassword::StrengthChecker.new(request.params['password']).calculate_entropy(use_dictionary: true) | |
is_strong = entropy >= min_entropy |
This file contains hidden or 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
Upgrading to localeapp:medium on checkmate-staging... failed | |
! en, controllers.heroku.resources.plan_change.invalid_plan |
This file contains hidden or 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
{ | |
"external_id":"12345qwert67890zxcvb", | |
"id":664, | |
"confirmation_number":"1234567890", | |
"state":"unauthorized", | |
"first_name":"Jane", | |
"last_name":"Doe", | |
"email":"[email protected]", | |
"room_code": "STDK", | |
"room_description":"AAA Rate, AAA Membership Card Required Guest - Room, 1 King Or 2 Double, Sofabed", |