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
| - if RAILS_ENV == "production" | |
| %script{ :type => "text/javascript" } | |
| var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
| %script{ :type => "text/javascript" } | |
| var pageTracker = _gat._getTracker("UA-3794127-4"); | |
| pageTracker._trackPageview(); |
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
| / small.data_status | |
| / / :float right | |
| / :position absolute | |
| / :right 10px | |
| / :top -10px | |
| / :margin-right 30px | |
| .advisor_image_medium | |
| :width 170px | |
| :border 10px solid #ccc |
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
| / small.data_status | |
| / / :float right | |
| / :position absolute | |
| / :right 10px | |
| / :top -10px | |
| / :margin-right 30px | |
| .advisor_image_medium | |
| :width 170px | |
| :border 10px solid #ccc |
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
| / small.data_status | |
| / / :float right | |
| / :position absolute | |
| / :right 10px | |
| / :top -10px | |
| / :margin-right 30px | |
| .advisor_image_medium | |
| :width 170px | |
| :border 10px solid #ccc |
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
| # memcached default config file | |
| # 2003 - Jay Bonci <jaybonci@debian.org> | |
| # This configuration file is read by the start-memcached script provided as | |
| # part of the Debian GNU/Linux distribution. | |
| # Run memcached as a daemon. This command is implied, and is not needed for the | |
| # daemon to run. See the README.Debian that comes with this package for more | |
| # information. | |
| -d |
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
| module ShouldaContextExtensions | |
| def self.included(base) | |
| base.class_eval do | |
| alias_method_chain :build, :fast_context | |
| alias_method_chain :am_subcontext?, :fast_context | |
| end | |
| end | |
| def fast_context(name, &blk) | |
| @fast_subcontexts ||= [] |
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
| function project_list { | |
| for n in ~/projects/* | |
| do | |
| if [ -d $n ] | |
| then | |
| echo `basename $n` | |
| fi | |
| done | |
| } |
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
| puts "Starting Premium Summary Update at #{start_time=Time.now}" | |
| PremiumSummary.default_advisors.each_with_index do |advisor,idx| | |
| puts "(((((( Advisor:#{idx+1} of #{PremiumSummary.default_advisors.count} )))))))" | |
| [MonthlyPremiumSummary, LifePremiumSummary, LtcPremiumSummary, DiPremiumSummary].each do |summary| | |
| summary.update_period(advisor, 2009, 9) | |
| summary.update_period(advisor, 2009, 10) | |
| end | |
| end | |
| puts "Ending #{end_time=Time.now}" | |
| puts "Process took: #{end_time-start_time}" |
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
| def MyModel.random_in_last(since = nil) | |
| if (c = self.count) == 0 | |
| nil | |
| else | |
| since ||= 2.weeks.ago | |
| find :first, :select => 'recent_models.*', | |
| :from => "(select * from `#{self.table_name}` where " + | |
| sanitize_sql_array(['created_at > ?', since]) + | |
| ") as recent_models", | |
| :offset => rand(c)) |
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 Kozmik | |
| def self.acts_as_frog(species) | |
| (@frog_list ||= []) << species | |
| #self.class.send :attr_accessor, :frog_list | |
| # | |
| # === OR === | |
| # | |
| # class << self | |
| # attr_accessor :frog_list | |
| # end |