Posts tagged with “Viddler”

The Official Viddler Ruby Gem

I just announced our new Ruby gem over on the Viddler blog. It’s a fairly basic wrapper for our v2 API for now, but I definitely have plans for some really cool features, like having ActiveModel compatible classes for stuff like videos, playlists, users, etc., as well as making it easy to integrate into existing ActiveRecord models in Rails.

So, if you’re into Ruby and you’re looking for a way to integrate video into your site, definitely check us out. We have a really great API, and now that there’s an official gem, it’s easier than ever to get started.

Posted on December 15, 2010 Leave a Comment
Tagged with: , , , ,

Easy Deploys to Multiple Environments with Capistrano

At Viddler, we’re switching to using Git and Capistrano for our internal projects, and I was tasked with setting up the system to deploy our code to both staging and production environments. Capistrano doesn’t have built-in environment switching, but it’s dead simple to add it yourself.

The key to getting this to work is to utilize Capistrano’s ability to chain tasks–if you run cap task1 task2, it will run the two commands in the order you listed them. Variables are shared between the tasks, so if you set a variable in task1, task2 will be able to access it. To get multiple environments working, you just create tasks to set environment variables, which you call before the actual task you want to run.

The first step is to figure out which variables you need to change, and then move them into their own tasks. Here’s an example of the tasks we added:

desc "Run on staging server"
task :staging do
  server "staging.myserver.com", :app, :web, :db, :primary => true
end

desc "Run on production server"
task :production do
  server "myserver.com", :app, :web, :db, :primary => true
end

Now, if you want to deploy to staging, just run cap staging deploy, and for production run cap production deploy. Easy.

Posted on December 10, 2009 1 Comment
Tagged with: , , , ,

Beanstalk will support Git

Over on the Beanstalk blog, Chris Nagele announces that Beanstalk will be supporting Git. We use Beanstalk at Viddler–it’s a superb application, and adding Git will make it even better.

Posted on August 12, 2009 Leave a Comment
Tagged with: , , , ,

Revision3 Beta

Yesterday, the second phase of Revision3 Beta, Revison3’s search for new shows, was released. I did pretty much all of the backend development, and it’s powered by Viddler’s API. There are some really great shows here, so definitely check it out. You can read Revision3’s announcement on their blog.

Posted on September 24, 2008 Leave a Comment
Tagged with: , , , ,

2 Minutes From New Media Expo

While at New Media Expo, Colin, Brandice, and I put together a podcast in one day to cover New Media Expo. We asked almost 30 people the same 3 questions, and their 2 minute answers provide a great way to catch up on the Expo. New episodes are being posted periodically, so be sure to keep checking back.

Posted on August 18, 2008 1 Comment
Tagged with: , , , , ,

New Media Expo Videos

Colin and Andrew, Technology Evangelist and Lead Designer, respectively, for Viddler have created a really great video site for the upcoming New Media Expo (which I’ll be going to). There’s sure to be all sorts of great content being posted over the next couple days, so definitely check it out.

Posted on August 12, 2008 Leave a Comment
Tagged with: , ,

PHP Facebook Paginator

While building the Viddler Facebook application, I needed to create a pagination tool that worked just like Facebook’s. After looking at their HTML and their logic of what pages to display, I came up with one, which I’m releasing for anyone to use. The function takes 5 arguments, in the following order:

  • $base_path: The base path for pagination. For instance, if /videos/4/ was page 4, $base_path would be “/videos”
  • $cur_page: The current page number
  • $total_items: The total number of items on the page
  • $per_page: The number of items that are displayed on each page
  • $footer_bar: If set to “true” this does not include the “Displaying items 1-5 of 10” text, and styles it as a footer paginator, instead of a header paginator.
  • $name: What you’re paginating. This shows up as “Displaying $items 5-10 of 40”

Here’s an example:

<?php echo paginator('/videos', 2, 44, 5, false, 'items'); ?>

And here’s what it would look like:

Paginator example

You can download the source here. Hopefully this helps someone!

Posted on July 8, 2008 7 Comments
Tagged with: , , , ,

Getting Started with phpViddler

Over on the Viddler Lab blog, Colin Devroe and I are putting together a series on how to use phpViddler, the PHP wrapper for Viddler API. Parts one and two are already up, and more are on the way, so definitely check it out if you’re interested in developing a site powered by Viddler.

Posted on April 22, 2008 2 Comments
Tagged with: , , ,