Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Techsylvania - Hackathons on Rails

Techsylvania - Hackathons on Rails

Cristiano Betta

June 08, 2015
Tweet

More Decks by Cristiano Betta

Other Decks in Technology

Transcript

  1. @braintree_dev @cbetta How I failed to let go of the

    2nd love of my life Cristiano Betta Developer Advocate
  2. @braintree_dev @cbetta Braintree fs.readdir(source, function(err, files) { if (err) {

    console.log('Error finding files: ' + err) } else { } })
  3. @braintree_dev @cbetta Braintree fs.readdir(source, function(err, files) { if (err) {

    console.log('Error finding files: ' + err) } else { files.forEach(function(filename, fileIndex) { console.log(filename) gm(source + filename).size(function(err, values) { } }) }) } })
  4. @braintree_dev @cbetta Braintree fs.readdir(source, function(err, files) { if (err) {

    console.log('Error finding files: ' + err) } else { files.forEach(function(filename, fileIndex) { console.log(filename) gm(source + filename).size(function(err, values) { if (err) { console.log('Error identifying file size: ' + err) } else { console.log(filename + ' : ' + values) aspect = (values.width / values.height) widths.forEach(function(width, widthIndex) { height = Math.round(width / aspect) console.log('resizing ' + filename + 'to ' + height + 'x' + height) this.resize(width, height).write(destination + 'w' + width + '_' + filename, function(err) { if (err) console.log('Error writing file: ' + err) }) }.bind(this)) } }) }) } })
  5. ç

  6. @braintree_dev @cbetta Braintree SparkCore, wemo, ifttt, Sendgrid, Python, Pusher, Twilio,

    AWS, NodeJS, Bootstrap, Backbone.js, SIP, handlebars, Braintree, webrtc, Swift, Geofencing