Skip to content

Instantly share code, notes, and snippets.

View xcode-waitforexpectation-snippet
let testExpectation = expectation(description: "<#description#>")
// do something then call fulfill (in callback)
testExpectation.fulfill()
waitForExpectations(timeout: <#timeout#>){ error in
if error != nil {
XCTFail("timed out waiting on expectation: \(testExpectation)")
}
}
View Asciidoctor.py
import re
import sublime
import sublime_plugin
import webbrowser
REG_RENAME = re.compile("\.(asciidoc|adoc|asc|ad)$")
EXT = re.compile(".*\.(asciidoc|adoc|asc|ad)$")
COMMAND = "asciidoctor -b html5"
@codeslubber
codeslubber / DateBuilder.java
Created May 20, 2013
Until JDK8, this provides a fluent builder means of making a Date.
View DateBuilder.java
package com.ontometrics.util;
import java.util.Calendar;
import java.util.Date;
/**
* Provides a fluent builder interface for constructing Dates and DateTimes.
*/
public class DateBuilder {
You can’t perform that action at this time.