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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
scripts: { | |
files: ['sass/*.scss'], | |
tasks: ['compass'], | |
options: { |
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 strict'; | |
angular.module('lbServices') | |
.config(function($provide) { | |
// store if a request is being processed | |
var pending = false; | |
$provide.decorator('Access_credential', function($delegate, $q, $cacheFactory){ |
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
// please note that this is not a complete Gulp File, | |
// it is just to remember how to set up a proxy | |
var httpProxy = require('http-proxy'); | |
var proxy = httpProxy.createProxyServer({ | |
target: 'http://0.0.0.0:9000' | |
}); | |
proxy.on('error', function(error, req, res) { |
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
[gui] | |
gui_a=common | |
gui_b=common | |
[server] | |
server_a=common | |
server_b=common |
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 strict'; | |
// async function (eg: rest call) | |
const makeRequest = function (endpoint) { | |
return new Promise(function (resolve, reject) { | |
resolve(endpoint); | |
}); | |
} | |
// generator function |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
angular.module('myModule', []) | |
.filter('orderObjectByKey', function(lodash) { | |
return function(items) { | |
if(!items){ | |
return; | |
} | |
return lodash.reduce(Object.keys(items).reverse(), (list, key) => { | |
list[key] = items[key]; |
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
// test that numbers are similar with a tolerance of 0.1 | |
var customMatchers = { | |
toBeSimilar: (util, tester) => { | |
const tolerance = 0.1; | |
return { | |
compare: (actual, expected) => { | |
return { |
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
// Karma configuration | |
// this is to load a different suite of test while developing | |
var testFiles = '*'; // by default load all js files | |
if(process.argv[4]){ | |
// if a param is specified, read only that file | |
testFiles = process.argv[4]; | |
} | |
var wiredep = require('wiredep'); |
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 () { | |
'use strict'; | |
describe('The service', () => { | |
let service, scope; | |
const resolveValue = 'The value you want to resolve.'; | |
const mock = { | |
promise: () => { | |
return { |
OlderNewer