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
// | |
// ViewController.m | |
// DetectAlertView | |
// | |
// Created by Dominique d'Argent on 4/14/13. | |
// Copyright (c) 2013 Dominique d'Argent. All rights reserved. | |
// | |
#import "ViewController.h" |
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
defmodule Teenager do | |
def hey(msg) do | |
msg |> interpret |> respond | |
end | |
defp interpret(""), do: :silence | |
defp interpret(msg) do |
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
$ torquebox run | |
... | |
18:29:11,620 INFO [org.torquebox.core.runtime.DefaultRubyRuntimePool] (pool-1-thread-2) Deferring start for stomplets runtime pool. | |
... | |
18:29:11,629 INFO [org.torquebox.core.runtime] (pool-6-thread-1) Creating ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: BulletinBoard, context: stomplets) | |
... | |
18:29:27,121 INFO [org.torquebox.core.runtime] (pool-6-thread-1) Created ruby runtime (ruby_version: RUBY1_9, compile_mode: JIT, app: BulletinBoard, context: stomplets) in 15.49s | |
... | |
18:29:27,835 INFO [stdout] (pool-1-thread-4) [#<BulletinsStomplet:0x120d47>#configure] destination: [Topic: /topics/warp] | |
> reload in chrome |
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
package main | |
import ( | |
"flag" | |
"log" | |
"database/sql" | |
_ "github.com/lib/pq" | |
) | |
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
*.mobileprovision diff=provisioningprofile | |
*.provisionprofile diff=provisioningprofile |
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
import Foundation | |
extension NSURL : StringLiteralConvertible { | |
class func convertFromStringLiteral(value: String) -> Self { | |
return self(string: value) | |
} | |
class func convertFromExtendedGraphemeClusterLiteral(value: String) -> Self { | |
return self(string: value) |
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
extension RawRepresentable where RawValue == Int { | |
static func enumerate() -> Self { | |
return self.init(rawValue: 0)! | |
} | |
static func makeIterator() -> AnyIterator<Self> { | |
var index = 0 | |
return AnyIterator { | |
let value = Self.init(rawValue: index) |
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
struct Manager { | |
final class Configuration { | |
var name: String = "default" | |
var timeout: Double = 500 | |
} | |
private let configuration: Configuration | |
var name: String { | |
return configuration.name |
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
id | first_name | last_name | ||
---|---|---|---|---|
1 | Ara | Hackett | ara.hackett@example.com | |
2 | Marco | Champlin | champlin.marco@example.org | |
3 | Martin | Rogahn | rogahn_martin@example.net | |
4 | Marcos | Turcotte | turcotte.marcos@example.net | |
5 | Jedediah | Yundt | yundt_jedediah@example.org | |
6 | Vivien | Schroeder | schroeder.vivien@example.net | |
7 | Leopold | Cartwright | leopold_cartwright@example.net | |
8 | Euna | Ernser | ernser_euna@example.com | |
9 | Rhianna | Feeney | rhianna_feeney@example.net |
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
infix operator ??= { | |
associativity right | |
precedence 90 | |
assignment | |
} | |
func ??=<T>(inout optional: T?, defaultValue: @autoclosure () -> T?) -> T? { | |
optional = optional ?? defaultValue() |