Skip to content

Instantly share code, notes, and snippets.

View dvgica's full-sized avatar

David van Geest dvgica

View GitHub Profile
View gist:65047b2124780ea78e1e7c4aacd260db
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/cfar_offer_creation_success"
}
],
"discriminator" : {
"propertyName" : "type",
"mapping" : {
View gist:84f7f63914ffc0c31e10f10f8c742d92
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/cfar_offer_creation_success"
}
],
"discriminator" : {
"propertyName" : "type",
"mapping" : {
View gist:c174026f3b033fd9c1b31f4852278d7a
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/cfar_offer_creation_success"
}
],
"discriminator" : {
"propertyName" : "type",
"mapping" : {
View gist:83c0951d813668f6ed87b79326c06109
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/cfar_offer_creation_success"
}
],
"discriminator" : {
"propertyName" : "type",
"mapping" : {
View gist:c010105d59d94d80908dfae52342ee63
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/CfarOfferCreationSuccess"
}
],
"discriminator" : {
"propertyName" : "type",
"mapping" : {
View gist:b198e4540835264116e32d656a036cb1
{
"$schema" : "https://json-schema.org/draft-04/schema#",
"oneOf" : [
{
"$ref" : "#/$defs/CfarEnterAuthenticatePage"
},
{
"$ref" : "#/$defs/CfarEnterCompletePage"
},
{
View json-schema.json
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"definitions" : {
"com.hopper.cloud.analytics.event.air.Event.FlightSearch" : {
"additionalProperties" : false,
"description" : "The end-user searched for flights",
"properties" : {
"filters" : {
"description" : "Any search filters used by the end-user",
"items" : {
View keybase.md

Keybase proof

I hereby claim:

  • I am DWvanGeest on github.
  • I am dwvangeest (https://keybase.io/dwvangeest) on keybase.
  • I have a public key whose fingerprint is 8E15 3812 85DF 6DDE BB69 C886 AF07 12E3 E027 D5D5

To claim this, I am signing this object:

@dvgica
dvgica / coverage.rake
Created November 4, 2011 20:58
Rake tasks for running your Rails tests with Rcov
View coverage.rake
# modified from original by Tim Su at http://www.betaful.com/2010/11/rails-3-rcov-test-coverage/
# place this in lib/tasks/
namespace :coverage do
task :clean do
rm_rf "test/coverage"
rm_f "test/coverage.data"
Rcov = "rcov --rails --aggregate coverage.data -Ilib \
@dvgica
dvgica / am_pm_time_select.rb
Created November 4, 2011 18:41
Initializer to add am/pm support to time_select helpers in Rails 3 (3.1 has an option, use it!)
View am_pm_time_select.rb
# modified from Bruno Miranda's original found here: http://brunomiranda.com/past/2007/6/2/displaying_12_hour_style_time_select/
# usage: <%= form.time_select :the_time, { :twelve_hour => true } %>
module ActionView
module Helpers
class DateTimeSelector
def select_hour_with_twelve_hour_time
datetime = @datetime
options = @options