At least when it comes to Firefox 4, the following are NOT equivalent, and will make calls to video.canPlayType to fail.
type="video/ogg; codecs='theora, vorbis'"
type='video/ogg; codecs="theora, vorbis"'
You want to use the second one.
require 'autotest/redgreen' | |
# require 'autotest/pretty' | |
# require 'autotest/snarl' | |
# require 'autotest/timestamp' | |
module Autotest::Growl | |
def self.growl title, msg, img, pri=0, sticky="" | |
system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}" | |
end |
cd source | |
wget http://monkey.org/~provos/libevent-1.4.11-stable.tar.gz | |
tar -zxvvf libevent-1.4.11-stable.tar.gz | |
cd libevent-1.4.11-stable | |
./configure | |
make | |
sudo make install | |
cd .. |
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |
→ terminitor start project | |
/Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/cores/mac_core.rb:18:in `execute_command': undefined method `do_script' for nil:NilClass (NoMethodError) | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:34:in `run_in_window' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:33:in `each' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:33:in `run_in_window' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:30:in `each_pair' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:30:in `run_in_window' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/abstract_core.rb:21:in `process!' | |
from /Users/frecial/.rvm/gems/ruby-1.8.7-p174/gems/terminitor-0.1.0/lib/terminitor/runner.rb: |
[color] | |
sh = auto | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
[core] | |
excludesfile = /Users/frecial/.gitignore | |
[user] | |
name = Stewart Laufer |
# http://forums.shopify.com/categories/6/posts/42926 | |
# This is a fairly simple mechanize script to create a few hundred or so shopify discounts from a CSV of groupon codes. | |
# You'll want to change all of the "changeme" values to your own. | |
# The script expects there to be a groupon_codes.csv in the same directory. | |
# | |
# The groupons_code.csv should look like this: | |
# 8m7677 | |
# 8m6749 | |
# 8m5398 | |
# 8m7699 |
zip state long lat | |
00001 AK 123 456 | |
00002 AK 234 678 |
curl -L https://gist.github.com/theIV/5022219/raw/18b68d524870041138a4cc95320b99c949fd2e13/chef_solo_bootstrap.sh | bash
More context: http://railscasts.com/episodes/339-chef-solo-basics
# How to use Paperclip for generic attachment types on models in Ruby on Rails | |
class User < ActiveRecord::Base | |
has_many :user_assets | |
end | |
# example of building a model which is a generic attachment asset | |
@user.build_user_asset(:asset_type => "podcast", :attached_file => some_uploaded_file_data) | |
# make a generic asset class, with instances initialized for specific asset |