configure maven2 tomcat plugin
<build> <finalName>reload-testfinalName>/groupId> <artifactId>tomcat-maven-pluginartifactId> org.codehaus.mojo< //localhost:8090/managerurl> http: myserver< /server> configuration> </plugin> plugins> </build>
2812 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
<build> <finalName>reload-testfinalName>/groupId> <artifactId>tomcat-maven-pluginartifactId> org.codehaus.mojo< //localhost:8090/managerurl> http: myserver< /server> configuration> </plugin> plugins> </build>
script/plugin install [name of plugin, or the url to the desired plugin]
http://dev.rubyonrails.org/svn/rails/plugins/legacy/
ENV[‘DB’] = ‘mysql’to /config/environment.rb
rescue Technoweenie::AttachmentFu::Backends::S3Backend::RequiredLibraryNotFoundErrorto /vendor/plugins/attachment_fu/test/fixtures
def is_admin? #TODO: make into an accessor? return false unless self.tiers tier_names = self.tiers.collect {|t| t.name} return tier_names.include? "admin" end
<%= stylesheet_link_tag 'scaffold', 'tag_cloud' %>
/* tag_cloud styles*/ .nube1 {font-size: 1.0em;} .nube2 {font-size: 1.2em;} .nube3 {font-size: 1.4em;} .nube4 {font-size: 1.6em;} .nube5 {font-size: 1.8em;} .nube6 {font-size: 2.0em;}
TAG CLOUD<br/> <%= render(:partial => "shared/article_tag_cloud", :locals => {:tags => @tags}) %>
<% # For our purposes, have this filter the list of articles to those with the chosen tag tag_cloud true, tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class| %> <%= link_to name, tag_path(name), class => css_class # links to Tag resource, with tag name as 'id' %> <% end %>
def tag_cloud(active, tags, classes) if !active then return end max, min = 0, 0 unless tags.empty? tags.sort! {|x,y| y.count <=> x.count} max = tags.first.count min = tags.last.count end divisor = ((max - min) / classes.size) + 1 tags.each { |t| yield t.name, classes[(t.count.to_i - min) / divisor] } end
class AddTaggable < ActiveRecord::Migration def self.up create_table :tags, :force => true do |t| t.column :name, :string end create_table :taggings, :force => true do |t| t.column :tag_id, :integer t.column :taggable_id, :integer t.column :taggable_type, :string t.column :created_at, :datetime end end def self.down drop_table "tags" drop_table "taggings" end end
{if project_video} {if project_video_title}<h4>{project_video_title}: Video Cliph4>{/if} <div id="videoClip"> <p style="margin: 10px 0; padding: 10px; border: 3px solid red;"><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" title="Get Flash Player"><img src="http://www.macromedia.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Flash Player" height="31" width="88" align="left" style="padding-right: 10px">a>Flash 7 or above and JavaScript are required to view the project video clip. Please download the //www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" title="Get Flash Player">latest Flash plug-in. {if project_video_alt}{project_video_alt}
{/if}