This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
var awssum = require('awssum'); | |
var amazon = awssum.load('amazon/amazon'); | |
var S3Service = awssum.load('amazon/s3'); | |
var s3 = new S3Service(config.aws.accessKeyId, | |
config.aws.secretAccessKey, config.aws.awsAccountID, amazon.US_EAST_1); | |
var options1 = { BucketName: 'sdcdntest' }; | |
s3.ListObjects(options1, function (err, data) { | |
console.dir(data); |
#!/usr/bin/env node | |
var Audio = require('./lib/audio'), | |
fs = require('fs'), | |
argv = require('optimist'); | |
var a = new Audio(); | |
var output = fs.createWriteStream('slow.wav'); | |
var cb = function (err, res) { |
#!/usr/bin/env node | |
var Audio = require('./lib/audio'), | |
argv = require('optimist') | |
.options('i', { alias: 'input', }) | |
.options('o', { alias: 'output', }) | |
.argv | |
; | |
var a = new Audio(); |
var spawn = require('child_process').spawn, | |
temp = require('temp'); | |
Audio.prototype.slowDown = function rb(options, input, cb) { | |
var speed = options.speed, | |
s = (this.isNumeric(speed) ? Math.pow(speed, -1) : | |
this.error('speed needs a number')), | |
slow = null; | |
console.log('if this prints it will work'); |
require 'formula' | |
def ffplay? | |
ARGV.include? '--with-ffplay' | |
end | |
class Ffmpeg < Formula | |
homepage 'http://ffmpeg.org/' | |
url 'http://ffmpeg.org/releases/ffmpeg-0.11.tar.bz2' | |
sha1 '1aa3443c20b1c5d132d1fe06de7cc949a7219edd' |
require 'formula' | |
def ffplay? | |
ARGV.include? '--with-ffplay' | |
end | |
class Ffmpeg < Formula | |
homepage 'http://ffmpeg.org/' | |
url 'http://ffmpeg.org/releases/ffmpeg-0.11.tar.bz2' | |
sha1 '1aa3443c20b1c5d132d1fe06de7cc949a7219edd' |
require 'formula' | |
class Ffmpeg2theora < Formula | |
homepage 'http://v2v.cc/~j/ffmpeg2theora/' | |
url 'http://v2v.cc/~j/ffmpeg2theora/downloads/ffmpeg2theora-0.28.tar.bz2' | |
md5 '31e389bfa0719f489af38b6fb2bd0a1f' | |
head 'http://svn.xiph.org/trunk/ffmpeg2theora' | |
depends_on 'pkg-config' => :build |
Video.prototype.slowDown = function (options, input, cb) { | |
var self = this, | |
audio = fs.createWriteStream('/tmp/' + uuid() + '.wav'), | |
video = fs.createWriteStream('/tmp/' + uuid() + '.mov'), | |
streamed = {}, | |
run_proc = null; | |
input.on('data', function (data) { | |
audio.write(data); |
function copy_doc(doc_src, doc_dest, opts, callback) { | |
if(typeof opts === "function") { | |
callback = opts; | |
opts = {}; | |
} | |
var params = { db: db_name, doc: doc_src, method: "COPY" | |
, headers: {"Destination": doc_dest} }; | |
head_doc(doc_dest, function (e,b,h) { | |
if (!e && opts.overwrite) { | |
params.headers["Destination"] += "?rev=" + h.etag.substring(1, h.etag.length - 1); |