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
var trait = require("../../util/trait"); | |
module.exports = trait("UserServiceInterface", [ | |
"createUser", | |
"createUserFromForm", | |
"getUserByEmail", | |
"authenticateUser", | |
"authenticateUserFromForm", | |
"isUserAdmin" | |
]); |
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
;(function(global, undefined) { | |
'use strict'; | |
var Colouri = function() { | |
this.color = '1d9caf'; | |
}; | |
global.Colouri = Colouri; | |
Colouri.prototype = (function() { | |
/** | |
* Private | |
*/ |
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
/* | |
Category-tree | |
Search time: O(n) | |
Insert time: O(n) | |
*/ | |
if (!Array.prototype.find) { | |
Object.defineProperty(Array.prototype, 'find', { | |
enumerable: 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
var Tetrad = function() { | |
this.degrees = 30; | |
this.colors; | |
}; | |
Tetrad.prototype = (function() { | |
/** | |
* Private | |
*/ |
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 assert from 'assert'; | |
import co from 'co'; | |
const state1 = (_) => new Promise((resolve, reject) => { | |
resolve(5); | |
}); | |
const state2 = (a) => new Promise((resolve, reject) => { | |
resolve(a + 5); | |
}); | |
const state3 = (b) => new Promise((resolve, reject) => { |
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
// Copyright (c) 2016, Jahan Addison | |
// License: MIT | |
// @version: 1.2.0 | |
type Tuple<T> = [T]; | |
type Pure<T> = (T: T) => T; | |
type Pattern = string | number; | |
type Invoker = Pure<Pattern>; | |
type Val = Tuple<Pattern>; | |
type Case = boolean; |
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
ƛ({ | |
server: 'irc.freenode.org', | |
nick: 'dslbot', | |
channel: '##dslbottesting' | |
}, | |
Connect(6667)( | |
line => on(/PING (\S+)/)(_ => { | |
server`PONG ${_}` | |
}), | |
line => on(/hello/)(_ => { |
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 { ƛ, Connect, server, message, reply, on } from './lib/dsl'; | |
const sandbox = require('sandbox'); | |
const virtual = new sandbox(); | |
ƛ({ | |
server: 'irc.freenode.org', | |
nick: 'qj2', | |
channel: '##frontend' | |
}, |
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
///////////////////////////////////////////////////////// | |
// B Language Grammar | |
// Author: Jahan Addison | |
// LALR(1) EBNF-like Grammar | |
// Placed under CC0 1.0 | |
///////////////////////////////////////////////////////// | |
program : ( definition ) * | |
definition : function_definition |
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
myactivity: | |
metadata: | |
title: 'Some Great Section' | |
description: '_____' | |
tags: | |
- 'something' | |
collection: | |
- 'pages.mypage' | |
- 'pages.mypage' | |
- 'pages.mypage' |
OlderNewer