Created
October 30, 2010 12:59
-
-
Save ollym/655273 to your computer and use it in GitHub Desktop.
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
// EXAMPLE OF IMAGE | |
var image = require('image'); | |
image = image.createImage(blob); | |
// Methods | |
image.resize(width, height, preserveAspectRatio); | |
image.crop(from_x, from_y, to_x, to_y); | |
image.rotate(degrees); | |
image.flip(horrizontal_or_vertical); | |
// Properties | |
image.width | |
image.height | |
/** | |
* MAIL MODULE | |
* | |
* The mail module is used to send and received. | |
*/ | |
// | |
// Sending messages | |
// | |
var mail = require('mail'); | |
var message = mail.createMessage(body); | |
// OR var message = new mail.Message(); | |
message.body = 'Some mail message body!'; | |
message.from = 'Albert Johnson <[email protected]>'; | |
message.to = 'Albert Johnson <[email protected]>'; | |
message.cc = 'Albert Johnson <[email protected]>'; | |
message.bcc = 'Albert Johnson <[email protected]>'; | |
message.attachments.push(blob); | |
message.send(to); | |
// | |
// Receiving messages | |
// | |
var mail = require('mail'); | |
mail.createReceiver('*@example.com', function(message) { | |
// Message is an instance of mail.Message | |
}); | |
/** | |
* Task Queue | |
* | |
* A task queue is used for | |
*/ | |
var ts = requite('taskqueue'); | |
var queue = ts.createQueue('name', time_till_live, asd); | |
// OR | |
var queue = ts.defaultQueue; | |
queue.addTask(task); | |
queue.addTask(function() { }, param1, param2, param3, _); | |
queue.addTask('some/uri', { | |
param1: '', | |
param2: '', | |
param3: '' | |
}); | |
/** | |
* | |
* | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment