View this code at http://livecoding.io/3449453
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
fs.readFile(file.path, function(err, buff){ | |
completed++; | |
if(err){ return; } | |
var headers = { | |
'Content-Length': buff.length, | |
'Content-Type': 'text/plain' | |
}; | |
var push = client.put(file.name, headers); | |
push.on('response', function(res){ |
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
//READER Directive | |
var initNotes = function($scope, Note, element, $compile){ | |
Note.find({ | |
user: $scope.global.user._id, | |
module: $scope.module._id | |
}).then(function(response) { | |
$scope.notes = response; | |
angular.forEach($scope.notes, function(note){ | |
var highlighted = element.find('span.phrase:contains("'+note.selectedText+'")'); | |
var html = '<oowli-note _id="'+note._id+'" content="'+note.content+'"></oowli-note>'; |
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
Object.prototype.ext = function(obj){ | |
for(var prop in obj){ | |
if(!Object.prototype[prop]){ | |
this[prop] = obj[prop] | |
} | |
} | |
} | |
var x = {a: 1, b: 2, c: 3} |
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
Location = { | |
referencia: { | |
type: Number, | |
unique: true | |
}, | |
owner: { | |
type: Schema.Types.ObjectId, | |
ref: 'Owner' | |
}, | |
accounts: [ |
NewerOlder