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 gulp = require('gulp'); | |
| var Handlebars = require('handlebars'); | |
| var globby = require('globby'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| // var transform = require('vinyl-transform'); | |
| var through = require('through2'); |
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
| spacify('hello world') // => 'h e l l o w o r l d' |
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
| [difftool "Kaleidoscope"] | |
| cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" | |
| [diff] | |
| tool = Kaleidoscope | |
| [difftool] | |
| prompt = false | |
| [mergetool "Kaleidoscope"] | |
| cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot | |
| trustExitCode = true | |
| [mergetool] |
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
| function createEmitter(object) { | |
| // a place to hold callbacks for event subscribers | |
| object._eventStore = {}; | |
| object.on = function(eventName, fn) { | |
| if (!this._eventStore[eventName]) { | |
| this._eventStore[eventName] = []; | |
| } | |
| this._eventStore[eventName].push(fn); | |
| }; |
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
| require 'fileutils' | |
| output = {} | |
| output['junk'] = [] | |
| Dir.foreach(source) do |f| | |
| if f != '.' and f != '..' and f != '.gitignore' | |
| output['junk'].push(f) | |
| end | |
| end |
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
| ................................................................................ | |
| ..........................................................................|..... | |
| ..........................................................................|..... | |
| .........................................................................dMb.... | |
| .........................................................................MMM.... | |
| ........................................................................dMMMb... | |
| ........................................................................NMMMN... | |
| ...............ddddm....................................................MMMMM... | |
| .......h..mmh..MMMMM...d..........h.....................................MMMMN... | |
| ......mMm.MMm..MMMMMh..MNNd....mMMMN..h................mmh....mm........MMMMN... |
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
| ................................................................................ | |
| ..........................................................................|..... | |
| ..........................................................................|..... | |
| .........................................................................MMM.... | |
| ........................................................................dMMMb... | |
| ........................................................................NMMMN... | |
| ...............ddddm....................................................MMMMM... | |
| .......h..mmh..MMMMM...d..........h.....................................MMMMN... | |
| ......mMm.MMm..MMMMMh..MNNd....mMMMN..h................mmh....mm........MMMMN... | |
| NNN..MMMMNMMMNNMMMMMMMhMMMm.NNmMMMMM.hMNNhddNMNmmmm.hNNMMN...hMMd.......MMMMM... |
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 mq = document.createElement('style'); | |
| mq.textContent = "@media (min-width: 768px) {body {background: salmon;}}"; | |
| document.getElementsByTagName('head')[0].appendChild(mq); |
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 Kitten = function(name) { | |
| this.name = name; | |
| var mouseCount; | |
| this.init = function() { | |
| this.stalk(function(count) { | |
| mouseCount = count; | |
| }); | |
| console.log('You found a kitten! Congrats! Its name is ' + this.name + ' and it caught ' + mouseCount + ' mice'); | |
| }; |
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 ANIMATE = (function(s) { | |
| return 'WebkitAnimation' in s || | |
| 'MozAnimation' in s || | |
| 'msAnimation' in s || | |
| 'Animation' in s; | |
| }(document.body.style)); |