Skip to content

Instantly share code, notes, and snippets.

View dbackeus's full-sized avatar

David Backeus dbackeus

View GitHub Profile
# ./spec/monque_benchmark.rb
dir = File.dirname(File.expand_path(__FILE__))
$LOAD_PATH.unshift(File.join(dir, '..', 'lib'))
require 'monque'
require 'benchmark'
class SimpleJob
def self.perform
"Done!"
# ./test/resque-mongo_benchmark.rb
require File.join(File.dirname(__FILE__), 'test_helper')
require 'benchmark'
class SimpleJob
def self.perform
"Awesome"
end
end
# ./test/resque_benchmark.rb
require File.join(File.dirname(__FILE__), 'test_helper')
require 'benchmark'
class SimpleJob
def self.perform
"Awesome"
end
end
require 'formula'
class Ffmpeg <Formula
head 'svn://svn.ffmpeg.org/ffmpeg/trunk', :revision => 22811
homepage 'http://ffmpeg.org/'
depends_on 'x264' => :optional
depends_on 'faac' => :optional
depends_on 'faad2' => :optional
depends_on 'lame' => :optional
require 'spec_helper'
describe MonkeysController do
def mock_monkey(stubs={})
@mock_monkey ||= mock_model(Monkey, stubs).as_null_object
end
describe "GET index" do
it "assigns all monkeys as @monkeys" do
# 2a6161c65e17659307285a53cbd27b3f14267b84
Account.all.each do |account|
account.update_attributes(:default_cdn_strategy => "LocalProgressive", :default_original_movie_strategy => "LocalStorage")
end
Movie.all.each do |movie|
movie.update_attributes(:cdn_strategy => "LocalProgressive", :original_file_strategy => "LocalStorage")
end
# 5dd99b907164a149e79f5bc10545bc290ebf5776
Account.where(:api_public_key => nil).each do |a|
@dbackeus
dbackeus / videos.json
Created July 21, 2010 10:23
Video List JSON
[
{
"id": "4d52c7e6e426007ba5000015",
"title": "Fantastic Streamio Video",
"tags": ["Sports", "HD"],
"description": "A text describing the video...",
"aspect_ratio_multiplier": 1.7777777777777777,
"duration": 14.1,
"image_id": null,
"plays": 51,
@dbackeus
dbackeus / video.json
Created July 22, 2010 12:28
Video JSON
{
"id": "4d52c7e6e426007ba5000015",
"title": "Fantastic Streamio Video",
"tags": ["Sports", "HD"],
"description": "A text describing the video...",
"aspect_ratio_multiplier": 1.7777777777777777,
"duration": 14.1,
"image_id": null,
"plays": 51,
"state": "ready",
@dbackeus
dbackeus / images.json
Created July 22, 2010 13:49
Images#index
[
{
"created_at": "2010-08-25T17:04:54+02:00",
"transcodings": [
{
"size": 323753,
"http_uri": "streamio.com/system/images/4c57f3975412901427000005_4c7531165412903eb0000003_normal.jpg",
"title": "normal",
"progress": 1.0,
"height": 400,
@dbackeus
dbackeus / images_create.json
Created July 22, 2010 13:51
Images#create
{
"created_at": "2010-08-25T17:04:54+02:00",
"transcodings": [
{
"size": 323753,
"http_uri": "streamio.com/system/images/4c57f3975412901427000005_4c7531165412903eb0000003_normal.jpg",
"title": "normal",
"progress": 1.0,
"height": 400,
"state": "ready",