XOR Media

Coding, Operations, Etc.

Extract a Video Clip on the Command-Line with avconv (ffmpeg)

If you want a quick and easy way to extract a clip from a larger video it doesn't get much simplier than using avconv (the new ffmpeg.) All you need to know is the start time and duration of the section you'd like to extract. Once you have ...

In misc, tagged: command-line, linux, and video.

Git: Check to see if a Commit has been pushed

If you run in to a situation where you'd like to determine if a commit has been pushed to a remote git branch there's a quick and easy command-line way to do so.

git branch -r --contains <committish>

The above command will list all of the remote branches ...

In misc, tagged: command-line, git, and linux.

Gunicorn, HTTPS, and Amazon Elastic Load Balancer

If you're looking to serve both HTTP and HTTPS out of EC2 from python, using gunicorn and ELB you'll need to add a bit of configuration to get gunicorn to correctly detect which scheme the original request was made with and thus allow Django (or whatever framework you ...

In ops, tagged: python, aws, and elb.

High Performance Web: Asynchronous HTTP


The secret to building high performance sites which depend on external web services is asynchronous HTTP. The trick to asynchronous HTTP (or anything with the exception of UI) is to avoid callback hell. Enter futures/promise objects. When used correctly they make doing substantial asynchronous IO, relatively straightforward.

It ...


High Performance Web: Reducing Database Round Trips


There are two main sources of latency in the backend of web applications: rendering (HTML templating or data serialization) and IO (database or external service calls.) Today we'll look at the latter and more specifically focus getting rid of extraneous database round trips. The fastest query possible is ...

In code, tagged: db, examples, performance, and sql.