Marcin's Musings

Random bits of stuff

Elastic Beanstalk Post-deployment Scripts

| Comments

Some of this is extracted from an answer I posted to a Stack Overflow question.

Recently I’ve been helping out a friend with a website and we are deploying it to AWS via their Elastic Beanstalk service. I’ve learned a few quirks of the platform in my, albeit brief, time working with it. One of these is that there’s no official way to run a “post deploy” script. You can run “Container Commands”), which are executed in your application directory BEFORE it is deployed (ie. made live), but no way to run a script AFTER your application is deployed (ie. when your application is in /var/app/current and the web server has been restarted).

Why would you need to do this?

Hello World!

| Comments

Hello! Let’s try this blogging thing again. Decided to give Octopress a whirl. Gone are the days of writing your own blogging engine every time you want to start writing a blog again (well, maybe).

Using CIDetector With Video From an AVCaptureSession

| Comments

I was checking out the CIDetector API in iOS5, specifically using it with an AVCaptureSession to detect faces in video.  I’d never played with the AV Foundation framework before, but it was pretty straight forward to hook up the front camera on the phone as an AVCaptureDevice and get the frames through an AVCaptureVideoDataOutput.

However I ran into issues when trying to get CIDetector to find faces in the CIImage from the video.  Eventually I came across the Apple SquareCam sample which contained the solution!

Solving a “Login Loop” in Mac OS X Lion Due to Corrupt LaunchServices Cache

| Comments

Because it might help someone else Googling and it took me forever to find. I could no longer login to my account after a few system crashes due to bad RAM during the login process.

If you are suffering from a so-called “login loop” in Mac OS X 10.7 Lion - ie. you login to your account and then suddenly you’re back at the login prompt again - your LaunchServices cache might be corrupt.