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 gulp = require('gulp'), | |
compass = require('gulp-compass'), | |
express = require('express'), | |
gutil = require('gulp-util'), | |
path = require('path'), | |
refresh = require('gulp-livereload'), | |
server = require('tiny-lr')(); | |
gulp.task('expressServer', function(){ | |
app = express(); |
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
Eric Schoffstall https://github.com/contra author Gulp.js |
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
# Use Gists to store entire functions | |
class QuickSort | |
def self.sort!(keys) | |
quick(keys,0,keys.size-1) | |
end | |
private | |
def self.quick(keys, left, right) |
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 Circle = function() {}; | |
Circle.prototype = { | |
area: function() { | |
return Math.PI * this.radius * this.radius; | |
}, | |
grow: function() { | |
this.radius++; | |
}, | |
shrink: function() { | |
this.radius--; |
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
.some-block {} /*block*/ | |
.some-block__element {} /*element*/ | |
.some-block_size_large {} /*modificator of block*/ | |
.some-block__element_size_large {} /*modificator of element*/ | |
/* | |
Block may contains another blocks and elements. | |
Element may contains another blocks and elements. | |
*/ |
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
//////////////////////////////////// | |
// $provider | |
//////////////////////////////////// | |
function supportObject(delegate) { | |
return function(key, value) { | |
if (isObject(key)) { | |
forEach(key, reverseParams(delegate)); | |
} else { | |
return delegate(key, value); |
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
<div class="main"> | |
<!--flex block--> | |
<div class="item">1 Lorem ipsum dolor sit amet, consecteur adipisicing elit. Excepturi repellat nisi ad soluta vitae velit similique consequatur aliquam, facere ea.</div> | |
<!--flex block--> | |
<div class="item">2 Lorem ipsum dolor sit amet, consecteur adipisicing elit. Excepturi repellat nisi ad soluta vitae velit similique consequatur aliquam, facere ea.</div> | |
<!--flex block--> | |
<div class="item">3 Lorem ipsum dolor sit amet, consecteur adipisicing elit. Excepturi repellat nisi ad soluta vitae velit similique consequatur aliquam, facere ea.</div> | |
<!--flex block--> | |
<div class="item">4 Lorem ipsum dolor sit amet, consecteur adipisicing elit. Excepturi repellat nisi ad soluta vitae velit similique consequatur aliquam, facere ea.</div> | |
<!--flex block--> |
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 updateTask(oldTask, newTask) { | |
var promise = new Promise(function (resolve, reject) { | |
resolve({status: 'success'}); | |
// resolve(Error('some error')); | |
}); | |
return promise; | |
} |
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
1. Install TypeScript Definition manager for DefinitelyTyped https://github.com/DefinitelyTyped/tsd | |
2. Install required packages: | |
tsd install node --save | |
3. Add in top your .ts file /// <reference path="../../typings/node/node.d.ts" /> | |
or all definition typed /// <reference path="../../typings/tsd.d.ts" /> | |
4. Add flags in tsc | |
--module commonjs |
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
// Disposable Mixin | |
class Disposable { | |
isDisposed: boolean; | |
dispose() { | |
this.isDisposed = true; | |
} | |
} | |
//Activatable Mixin | |
class Activitable { |