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
grunt.registerMultiTask('s3deploy', 'deploy to S3 using awssum', function () { | |
// dependencies | |
var awssum = require('awssum'), | |
fs = require('fs'), | |
path = require('path'), | |
aws = require('./settings').aws; | |
var amz = awssum.load('amazon/amazon'), | |
AmazonS3 = awssum.load('amazon/s3'), | |
s3 = new AmazonS3({ |
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
#!/usr/bin/env node | |
var base_str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"; | |
console.log( number_to_base(process.argv[2], base_str) ); | |
function number_to_base(n, str) { | |
if ( n === 0 ) return "0"; | |
var b = ''; | |
while ( n > 0 ) { |