You can think of YAML as a superset of JSON. Any JSON document can be easily converted to YAML.
The JSON types are
- null
- boolean
- number
function tests() { | |
describe('Op1', function () { | |
it('tests op1', function () {}); | |
}); | |
} | |
module.exports = tests; |
{ | |
"items": { | |
"defaultAttribute": "attributeEnumSet.presentValue" | |
}, | |
"schema": { | |
"type": "object", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"language": "en-US", | |
"title": "JCI BV", | |
"version": "1.0", |
# all lfs tracking turned off | |
# Documents | |
*.bibtex text diff=bibtex | |
*.md text | |
*.tex text diff=tex | |
*.adoc text | |
*.textile text | |
*.mustache text | |
*.csv text |
// Producing combinations | |
// Porting Eric Lippert's code to Swift | |
// http://ericlippert.com/2014/10/13/producing-combinations-part-one/ | |
import Cocoa | |
public class ImmutableStack<T> { | |
public func push(t:T) -> ImmutableStack<T> { | |
return NonEmptyStack(top: t, tail: self) |
class Predicate<T> { | |
let pred:(T) -> Bool | |
init(pred:(T) -> Bool) { | |
self.pred = pred | |
} | |
subscript(input:T) -> Bool { | |
get { | |
return pred(input) | |
} | |
} |
// -------------------------------------------------------------------- | |
// | |
// ==UserScript== | |
// @name Link to Story 2 | |
// @namespace loominate.net | |
// @version 1.4 | |
// @description Used on github.com to convert a story id to a link to the pivotal tracker story. | |
// @include https://github.com/*/commits/* | |
// @include https://github.com/*/commits | |
// @include https://github.com/*/commit/* |
let rand = randomRIO (0,100); | |
-- or just type "randomRIO (lo, hi)" |
using System.Collections.Generic; | |
namespace CollectionsExtensions | |
{ | |
public static class EnumerableExtensions | |
{ | |
/// <summary> | |
/// Provides an extension method that gets an iterator for | |
/// IEnumerables. This makes it as easy to get an iterator as it | |
/// is to get an enumerator. |