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
tmp node tmp.js | |
3 Aug 13:05:57 - ---DOM created | |
3 Aug 13:05:57 - 0 seconds [Remove all stylesheets] | |
3 Aug 13:05:57 - 0 seconds [Turn all double br's into p's] | |
3 Aug 13:05:57 - 0.007 seconds [prepDocument] | |
3 Aug 13:05:57 - 0.712 seconds [grabArticle nodePrepping] | |
3 Aug 13:05:57 - 0.01 seconds [grabArticle calculate scores] | |
3 Aug 13:05:57 - 0.022 seconds [grabArticle find top candidate] | |
3 Aug 13:05:57 - 0.015 seconds [grabArticle look through its siblings] | |
3 Aug 13:05:57 - 0.002 seconds [cleanConditionally] |
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 readability = require('readability'); | |
var html = fs.readFileSync('test.html', 'utf-8'); | |
// This is an very early example. The API is subject to change. | |
readability.parse(html, 'http://www.cnn.com/2013/08/01/politics/congress-work-time/index.html?hpt=hp_t1', function(result) { | |
console.log(JSON.stringify(result, null, 4)); | |
}); |
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
[ | |
{ | |
"model": "User", | |
"type": [String], | |
"username": String, | |
"courses": [Course], | |
"authentication": { | |
"pasword": SHAEncodedString, | |
"accessTokens": [String] | |
} |
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
server { | |
listen 0.0.0.0:12345; | |
location / { | |
root /home/zdwolfe/src/angularAWS/app; | |
try_files $uri $uri/ /index.html =404; | |
} | |
} |
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
user.js: | |
'use strict'; | |
angular.module('myApp') | |
.controller('UserCtrl', function ($scope, Restangular) { | |
$scope.users = Restangular.all('user').getList(); | |
}); | |
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 sayHello() { | |
console.log('hello '); | |
} | |
process.nextTick(sayHello); | |
console.log('world!'); |
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'; | |
describe('Controller: ContentCtrl', function () { | |
// load the controller's module | |
beforeEach(module('myApp')); | |
var ContentCtrl, scope, state, q; | |
// Initialize the controller and a mock scope |
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'; | |
describe('Controller: CourseCtrl', function () { | |
// load the controller's module | |
beforeEach(module('myApp')); | |
var CourseCtrl, | |
scope; |
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'; | |
describe('Controller: CourseCtrl', function () { | |
// load the controller's module | |
beforeEach(module('myApp')); | |
// load controller widgets/views/partials | |
var views = [ | |
'views/course.html', |
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
module.exports = function(config) { | |
'use strict'; | |
config.set({ | |
basePath: '', | |
frameworks: ['jasmine'], | |
files: [ | |
'app/bower_components/angular/angular.js', | |
'app/bower_components/angular-mocks/angular-mocks.js', | |
'app/scripts/*.js', | |
'app/scripts/**/*.js', |