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
/* | |
* Alex Bosworth | |
* | |
* A straightforward S3 library | |
* | |
* USE: var s3 = new S3(AWS_KEY, AWS_SECRET, {defaultBucket : MY_BUCKET}); | |
* s3.put(KEY, {data:{},headers:{}}, [bucket]); | |
* s3.get(KEY, [bucket]).on('success', function(data) { console.log(data); }); | |
* (more operations: buckets, info, list) | |
* |
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
// for node-jquery.js (http://gist.github.com/599831) | |
// add this to a script to show how long it took to complete | |
process.on('exit', $.proxy(function () { | |
var sec = Math.round((new Date().getTime() - this.start.getTime()) / 1000); | |
console.log('completed', 'in ' + sec + ' seconds'); | |
}, {start:new Date()})); |
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
/* | |
* Alex Bosworth | |
* | |
* A straightforward S3 library | |
* | |
* USE: var s3 = new S3(AWS_KEY, AWS_SECRET, {defaultBucket : MY_BUCKET}); | |
* s3.put(KEY, DATA); | |
* s3.get(KEY).on('success', function(data) { console.log(data); }); | |
* (more operations: buckets, info, list) | |
* |
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
// node-jquery - port of jquery 1.4.2 (http://jquery.com/)to node.js by alex bosworth (http://alexbosworth.net/) | |
function now() { | |
return (new Date).getTime(); | |
} | |
var window = {}, | |
jsc = now(), | |
rscript = /<script(.|\s)*?\/script>/gi, | |
rselectTextarea = /select|textarea/i, |
NewerOlder