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
Show hidden characters
{ | |
"extends": ["airbnb"], | |
"parser": "babel-eslint", | |
"rules": { | |
"semi": [2, "never"], | |
"no-unused-vars": [ | |
1, | |
{ | |
"argsIgnorePattern": "res|next|^err" | |
} |
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
root = true | |
indent_size = 2 | |
indent_style = space | |
tab_width = 2 | |
end_of_line = lf | |
insert_final_newline = true |
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
{ | |
"name": "workflow", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", |
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
gulp = require 'gulp' | |
gutil = require 'gulp-util' | |
del = require 'del' | |
sass = require 'gulp-sass' | |
coffee = require 'gulp-coffee' | |
uglify = require 'gulp-uglify' | |
browserSync = require 'browser-sync' | |
autoprefixer = require 'gulp-autoprefixer' | |
browserify = require 'browserify' |
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 is_array = function (value) { | |
return value && | |
typeof value === 'object' && | |
typeof value.length === 'number' && | |
typeof value.splice === 'function' && | |
!(value.propertyIsEnumerable('length')); | |
}; |
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
// since I can connect from multiple devices or browser tabs, we store each connection instance separately | |
// any time that connectionsRef's value is null (i.e. has no children) I am offline | |
var myConnectionsRef = new Firebase('https://<your-firebase>.firebaseio.com/users/joe/connections'); | |
// stores the timestamp of my last disconnect (the last time I was seen online) | |
var lastOnlineRef = new Firebase('https://<your-firebase>.firebaseio.com/users/joe/lastOnline'); | |
var connectedRef = new Firebase('https://<your-firebase>.firebaseio.com/.info/connected'); | |
connectedRef.on('value', function(snap) { | |
if (snap.val() === true) { |
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
// moment.js locale configuration | |
// locale : chinese (zh-cn) | |
// author : suupic : https://github.com/suupic | |
// author : Zeno Zeng : https://github.com/zenozeng | |
(function (factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['moment'], factory); // AMD | |
} else if (typeof exports === 'object') { | |
module.exports = factory(require('../moment')); // Node |
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
//app.model.js | |
var app = {}; | |
app.PageList = function() { | |
return m.request({method: "GET", url: "pages.json"}); | |
}; | |
app.vm = {}; | |
app.vm.init = function() { | |
this.pages = new app.PageList(); |
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
// Used to track the enabling of hover effects | |
var enableTimer = 0; | |
/* | |
* Listen for a scroll and use that to remove | |
* the possibility of hover effects | |
*/ | |
window.addEventListener('scroll', function() { | |
clearTimeout(enableTimer); | |
removeHoverClass(); |