Skip to content

Instantly share code, notes, and snippets.

# Convert all dvdmedia files in the current directory to iso images
# OSX only
# .dvdmedia files are really just folders that hold the VIDEO_TS/AUDIO_TS
# but adding .dvdmedia make OSX do nice things
movie_directory = Dir.open( Dir.pwd )
movie_directory.entries.each do |movie|
if movie.include? '.dvdmedia' then
movie_name = movie.chomp '.dvdmedia'
puts movie + " --> " + movie_name
result = `hdiutil makehybrid -udf -udf-volume-name #{movie_name} -o #{movie_name} #{movie}`
public void encodeBegin( FacesContext context ) throws IOException {
super.encodeBegin( context );
// Without this 'if' statement everything gets rendered again on every partial submit
if( getChildCount() == 0 ) {
processTagAttributes();
if( fieldSetContainerList != null && !fieldSetContainerList.isEmpty() ) {
ENV['GEM_HOME'] = '/home/<dreamhost user name>/.gems'
ENV['GEM_PATH'] = '$GEM_HOME:/usr/lib/ruby/gems/1.8'
require 'rubygems'
Gem.clear_paths
module Rack
# A rack middleware for validating HTML via w3c validator
class Validate
def initialize( app )
@app = app
end
def call( env )
@nerdEd
nerdEd / gist:276366
Created January 13, 2010 16:56 — forked from bryanl/gist:276363
Bryan:
macruby-nightly [ ]
ree-1.8.6-20090610 [ x86_64 ]
ree-1.8.7-2009.10 [ x86_64 ]
=> ruby-1.8.6-p383 [ x86_64 ]
ruby-1.9.1-p376 [ x86_64 ]
(default) ree-1.8.7-2009.10 [ x86_64 ]
system [ ]
ree-1.8.7-2009.10 [ x86_64 ]
ruby-1.8.6-p383 [ x86_64 ]
=> ruby-1.8.7-p248 [ x86_64 ]
ruby-1.9.1-p376 [ x86_64 ]
=> (default) ruby-1.8.7-p248 [ x86_64 ]
system [ x86_64 i386 ppc ]
john-mbp:gem_filer john$ ruby -rubygems gem_runner_test.rb
Successfully installed thor-0.12.3
1 gem installed
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:31: warning: already initialized constant EXPR_BEG
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:32: warning: already initialized constant EXPR_MID
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:33: warning: already initialized constant EXPR_END
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:34: warning: already initialized constant EXPR_ARG
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:35: warning: already initialized constant EXPR_FNAME
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:36: warning: already initialized constant EXPR_DOT
/Users/john/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:37: warning: already initialized constant EXPR_CLASS
under RVM 1.8.7:
MBP:oss ed$ ruby -rubygems test.rb
Successfully installed thor-0.12.3
1 gem installed
/Users/ed/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:31: warning: already initialized constant EXPR_BEG
/Users/ed/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:32: warning: already initialized constant EXPR_MID
/Users/ed/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:33: warning: already initialized constant EXPR_END
/Users/ed/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:34: warning: already initialized constant EXPR_ARG
/Users/ed/.rvm/ruby-1.8.7-p248/lib/ruby/1.8/rdoc/parsers/parse_rb.rb:35: warning: already initialized constant EXPR_FNAME
#!/bin/bash
gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
gem install rails --pre
gem install hanna