Skip to content

Instantly share code, notes, and snippets.

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)")
}
}
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 16:01
Until JDK8, this provides a fluent builder means of making a Date.
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 {