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 "rack" | |
require "last/endpoints" | |
require "last/routers" | |
require "last/middlewares/body_parser_for_json_content_type" | |
class Router < Last::Routers::Router | |
get "/accounts", Application::V1::ListAccountsEndpoint | |
end | |
class ListAccountsEndpoint < Last::Endpoints::Endpoint |
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
// The variable `delegate` property of `UINavigationController` is defined as `unowned`. | |
// | |
// Given a case in which that `delegate` must be retained, is this the best pattern for doing so? | |
class CustomNavigationController: UINavigationController { | |
override var delegate: UINavigationControllerDelegate? { | |
didSet { | |
self.strongDelegate = delegate | |
} |
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
javascript:(function(){var subtotal=parseInt($('%23subtotal').text().replace(/\$/g,''));var fee=parseInt($('%23service_fee').text().replace(/\$/g,''));var guests=parseInt($('%23number_of_guests').val());var total=subtotal+fee;var total_per_guest=total / guests;var total_per_couple=total_per_guest*2;$('%23show_more_subtotal_info').html("Total: $"+total+"<br>Per Guest/Couple: $"+total_per_guest+" / $"+total_per_couple);})(); |
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
# Gemfile | |
# source 'https://rubygems.org' | |
# gem 'poltergeist', :require => 'capybara/poltergeist' | |
require 'bundler'; Bundler.require | |
include Capybara::DSL | |
Capybara.register_driver :poltergeist do |app| | |
Capybara::Poltergeist::Driver.new(app, :js_errors => false) |
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 'rubygems' | |
require 'hashie' | |
require 'httparty' | |
require 'json' | |
module Gowalla | |
class Issues | |
include HTTParty |