This file contains hidden or 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
| public class Choice<TKey, TValue> | |
| where TKey : Choice<TKey, TValue>, new() | |
| { | |
| private TValue _value; | |
| public static implicit operator TValue(Choice<TKey, TValue> choice) | |
| { | |
| return choice._value; | |
| } |
This file contains hidden or 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
| mixin message(editable) | |
| .message | |
| .avatar | |
| .image | |
| if editable == true | |
| .content | |
| .container.dynamic | |
| .editor(contenteditable="true") | |
| img(src="http://larryfire.files.wordpress.com/2008/11/ny.png") | |
| else |
This file contains hidden or 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 fs = require("fs"); | |
| var jade = require("jade"); | |
| var path = require("path"); | |
| var templatesPath = "FrontEnd/templates/"; | |
| fs.watch(templatesPath, { persistent: true }, function(event, filename) { | |
| var extName = path.extname(filename); | |
| if (extName === ".jade") { | |
| var filePath = templatesPath + filename; | |
| jade.renderFile(filePath, { pretty: true}, function(error, html) { |
This file contains hidden or 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 fs = require('fs'); | |
| var path = require('path'); | |
| var q = require('q'); | |
| var buildDirTree = function(dir, excludedDirs) { | |
| excludedDirs = excludedDirs || []; | |
| var readdir = q.denodeify(fs.readdir); | |
| var lstat = q.denodeify(fs.lstat); |
This file contains hidden or 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 defer = function() { | |
| var result = {}; | |
| result.promise = new Promise(function(resolve, reject) { | |
| result.resolve = function(value) { | |
| resolve(value); | |
| }; | |
| result.reject = function(value) { | |
| reject(value); | |
| }; | |
| }); |
This file contains hidden or 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
| /* c9.io kill active node process */ | |
| (function(){ | |
| "use strict"; | |
| var exec = require('child_process').exec, | |
| lCmd = 'kill -9' + ' ' + /* kill finded process */ | |
| '`ps ax' + '|' + /* show all process */ | |
| 'grep node-openshift' + '|' + /* find node-openshift */ | |
| 'grep -v grep' + '|' + /* exlude grep command */ |
This file contains hidden or 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 http = require('http'); | |
| var https = require('https'); | |
| var q = require('q'); | |
| var url = require('url'); | |
| var path = require('path'); | |
| var imageMimes = { | |
| '.jpeg': 'image/jpeg', | |
| '.jpg': 'image/jpg', | |
| '.png': 'image/png', |
This file contains hidden or 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
| module eve { | |
| export interface Event { | |
| type: string; | |
| target?: any; | |
| value?: any; | |
| } | |
| export interface EventListener { | |
| callback: (e: Event) => void; |
This file contains hidden or 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
| module FilmLanguage | |
| type Mood = Calm | Anger | Sad | Happy | Amaze | |
| type Gag = Laugh | Facepalm | Confusion | Cry | Exaltation | Party | Puke | Razz | Cake | Kiss | |
| type Action = Idle | Point | Time | Rulez | Sucks | Applaud | Fool | Hi | Sun | |
| type Smile = Mood of Mood | Gag of Gag | Action of Action |
This file contains hidden or 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
| module animation { | |
| export interface Token { | |
| identity: string; | |
| value: string; | |
| } | |
| export interface InputData { | |
| tokens: Token[]; | |
| leftActor: string; | |
| rightActor?: string; |