How to Download an S3 File Using a Different Filename

aws

I was recently working on the downloadable files features on the Cinevee platform and noticed that renaming large S3 files (1Gb+) using the AWS SDK S3 client can take up to 5-10 seconds — making the site feel like its frozen or sluggish. So I created a ‘Display Name’ field in our files table to keep track of the public-facing name of the file.

Not only does this beautify our file names to the customer but it speeds up the responsiveness of our platform for admins (usually DB calls are faster than API calls). Before updating, we recognized this introduced a potential disconnect for the customers who would click to download ‘FEATURE FILM 720p HD.m4v’ but end up with a file that was originally named ‘FEATUREFILM_123.m4v’. Luckily, with AWS SDK2, we can download any file in our S3 bucket with a different filename. Let’s get started.
Continue reading

Mr. Carousel, meet Mr. Vimeo. Now talk!

vimeo

Carousels are a great way to share a lot of similarly weighted content in one block — saving previous page real estate. Carousels with video can be even more captivating. But if you want to add video to a carousel that automatically cycles you may find that Mr. Carousel doesn’t care that Mr. Vimeo is playing and will cycle on to the next slide.

So how do we fix that? Enter Froogaloop outlined on Vimeo’s developer page.
Continue reading

Using Multiple AWS Credential Files for Elastic Beanstalk

aws-eb

At Cinevee, we are developing several forks of our distribution platform for each of our partners. This means we deploy to a different environment in a different AWS account (with differing credentials) for each fork. Re-initializing Elastic Beanstalk eb init before you git aws.push can get annoying when you are switching back forth between projects a dozen times a day (we’re quite agile). So here’s a quick way to setup and switch between your AWS credential files per project.
Continue reading

CodeIgniter + Memcached = Happy Appy

aws-elasticache

Using in-memory caching for your web app can dramatically increase the responsiveness of your web app (Apdex) — especially if you make a lot of database calls or complicated joins. Getting caching setup for your web app but also for your development environment can be, well, a pain in the ass. So here’s my step-by-step guide to implement memcached (not memcache, as ElastiCache uses memcached) in CodeIgniter that runs during development with MAMP 2.0 and in production in AWS Elastic Beanstalk with ElastiCache. Phew. Let’s get started.
Continue reading

Quadrant Test

quadrant-feature

The Quadrant Test is something I came up with to gauge an interviewing coder’s programming aptitude. Generally, if they rise to the challenge (even if the code has flaws) they’ve shown us a passion for solving problems. And that’s what we’re really looking for — someone who isn’t scared of figuring out things that seem impossible at first glance.
Continue reading