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() { | |
var root = $(document.getElementsByTagName('body')); | |
var watchers = []; | |
var f = function(element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
angular.forEach(element.data().$scope.$$watchers, function(watcher) { | |
watchers.push(watcher); | |
}); | |
} | |
angular.forEach(element.children(), function(childElement) { |
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
'use strict'; | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var httpProxy = require('http-proxy'); | |
/* This configuration allow you to configure browser sync to proxy your backend */ | |
var proxyTarget = 'http://server/context/'; // The location of your backend | |
var proxyApiPrefix = 'api'; // The element in the URL which differentiate between API request and static file request |
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
#!bash | |
# | |
# git-flow-completion | |
# =================== | |
# | |
# Bash completion support for [git-flow](http://github.com/nvie/gitflow) | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# * git-flow init and version |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
#usage: | |
#{% loop_directory directory:images iterator:image filter:*.jpg sort:descending %} | |
# <img src="{{ image }}" /> | |
#{% endloop_directory %} | |
module Jekyll | |
class LoopDirectoryTag < Liquid::Block | |
include Liquid::StandardFilters | |
Syntax = /(#{Liquid::QuotedFragment}+)?/ |
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.config({ | |
paths: { | |
// use cdn default | fall back local copy | |
"jquery": [ | |
'//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js', | |
'lib/jquery' | |
] | |
"backbone": "vendor/backbone", | |
"underscore": "vendor/underscore" | |
}, |
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 BaseModel = function(type){ | |
this.type = !type ? "BaseModel" : type ; | |
}; | |
BaseModel.prototype.sayHello = function() { | |
return "Hello " + this.type; | |
}; | |
var User = function() { |
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
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
/*global module:false*/ | |
module.exports = function(grunt) { |
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
// Write a program that finds the document with the highest | |
// recorded temperature for each state, and adds a "month_high" | |
// field for that document, setting its value to true. | |
var MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect('mongodb://localhost:27017/weather', function(err, db) { | |
if(err) throw err; | |
var cursor = db.collection('data').find({}); |
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.config({ | |
paths: { | |
// use cdn default | fall back local copy | |
"jquery": [ | |
'//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js', | |
'lib/jquery' | |
] | |
"backbone": "vendor/backbone", | |
"underscore": "vendor/underscore" | |
}, |