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
| describe('_.sortBy of lodash',function(){ | |
| var descData = [ | |
| {title: "B", number: 2, date: new Date("October 2, 2014") }, | |
| {title: "A", number: 1, date: new Date("October 1, 2014") }, | |
| ]; | |
| var ascData = [ | |
| {title: "A", number: 1, date: new Date("October 1, 2014") }, | |
| {title: "B", number: 2, date: new Date("October 2, 2014") }, | |
| ]; |
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
| // Detect autoplay | |
| // --------------- | |
| // This script detects whether the current browser supports the | |
| // autoplay feature for HTML5 Audio elements, and it sets the | |
| // `AUTOPLAY` variable accordingly. | |
| // Used in the Meteor app [PicDinner](http://picdinner.com) |
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
| gulp.task('build', gulpsync.sync(['unlock', 'compress']), function () { | |
| var endpoint = '/apps/' + config.phoneGap.appId; | |
| var env = config.ensure.environment(argv.env, argv.debugmode); | |
| pgBuild.auth({ token: config.phoneGap.authToken }, function (e, api) { | |
| gulp.src('tmp/*.zip').pipe(tap(function (file, t) { | |
| var options = { | |
| form: { | |
| data: { |
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
| myApp.directive("jplayer", ['$window', 'PlayerService', function ($window, PlayerService) { | |
| return { | |
| restrict: "E", | |
| // Have our own scope - we only want to watch the service and not conflict with other scopes | |
| scope: {}, | |
| // Serve up some html with our player | |
| templateUrl: "/jplayer-template.html", | |
| link: function (scope, element, attrs) { | |
| // An element on the page to attach the jPlayer to. Could also use "element" from linkFN ^ | |
| var jPlayer = angular.element("#jquery_jplayer_1").jPlayer(); |
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
| /*global chrome*/ | |
| var EventEmitter = require('./events.js').EventEmitter; | |
| var util = require('./util.js'); | |
| function SerialPort(port, options) { | |
| var self = this; | |
| var id; | |
| var bytesToRead = options.buffersize || 1; |
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 dotenv = require('dotenv'); | |
| dotenv.load(); | |
| var Hapi = require('hapi'); | |
| var _ = require('lodash'); | |
| var jwt = require('jsonwebtoken'); | |
| var Joi = require('joi'); | |
| var PORT = process.env.PORT || 8001; | |
| process.env.SHARED_SECRET = 'Change me in an env file'; |
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
| angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
| .run(function(DB) { | |
| DB.init(); | |
| }); |
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
| Ionic and ngCordova upload example |
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
| [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\4.0] | |
| "VCTargetsPath"="$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\" | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0] | |
| "VCTargetsPath"="$(MSBuildExtensionsPath32)\\Microsoft.Cpp\\v4.0\\" |
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
| /** | |
| * Conic gradients test | |
| * PASS if green gradient, FAIL if red. | |
| */ | |
| background: red; | |
| background: conic-gradient(limegreen, green, limegreen); | |
| min-height: 50%; |