This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Shell script for switching between ruby versions | |
| # | |
| # Hat Tip To | |
| # http://www.metaskills.net/2009/1/20/multiruby-the-macports-way-testing-your-rails-apps-with-ruby-1-9 | |
| # | |
| chruby () { | |
| v=`ruby -e "puts RUBY_VERSION.split('.')[0,2].join('.')"` | |
| if [ $v = "1.9" ]; then | |
| cv="1.8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <title>test</title> | |
| <style type="text/css" media="screen"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <title>test</title> | |
| <style type="text/css" media="screen"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| has_many :tags_taggings, :as => :taggable, :class_name => 'Tagging', :conditions => "taggings.association = 'tags'", :dependent => :destroy | |
| has_many :tags, :class_name => 'Tag', :through => :tags_taggings, :source => :tag | |
| has_many :likes_taggings, :as => :taggable, :class_name => 'Tagging', :conditions => "taggings.association = 'likes'", :dependent => :destroy | |
| has_many :likes, :class_name => 'Tag', :through => :likes_taggings, :source => :tag | |
| define_index do | |
| indexes tags(:name), :as => :tags | |
| indexes likes(:name), :as => :likes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
| <title>popup test</title> | |
| <style type="text/css" media="screen"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'htmlentities' | |
| class String | |
| def plain_text | |
| coder = HTMLEntities.new | |
| coder.decode(self).gsub(/<\/?[^>]*>/, '') | |
| end | |
| def html | |
| coder = HTMLEntities.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo aptitude update | |
| sudo aptitude dist-upgrade | |
| sudo aptitude install openssh-server | |
| sudo aptitude install build-essential binutils-doc | |
| sudo aptitude install autoconf flex bison | |
| sudo aptitude install vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Attempt 1 (require comes first) | |
| --------------------------------- | |
| ### lib/html5-boilerplate.rb ### | |
| require File.join(File.dirname(__FILE__), 'app', 'helpers', 'html5_boilerplate_helper') | |
| Compass::Frameworks.register("html5-boilerplate", :path => "#{File.dirname(__FILE__)}/..") | |
| Stack Trace: | |
| /Users/peter/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /Users/peter/.rvm/gems/ruby-1.9.2-head@html5/gems/html5-boilerplate-0.1.6/lib/html5-boilerplate.rb:1: syntax error, unexpected tCONSTANT, expecting $end (SyntaxError) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Author | |
| include Mongoid::Document | |
| field :name, :type => String | |
| embeds_many :posts | |
| end | |
| class Post | |
| include Mongoid::Document | |
| field :title, :type => String | |
| embedded_in :author |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem install ruby-debug19 -- --with-ruby-include=/Users/peter/.rvm/src/ruby-1.9.2-head/ |
OlderNewer