<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>JustinBKay.org - initio</title>
  <id>tag:justinbkay.org,2008:mephisto/</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://justinbkay.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://justinbkay.org/" rel="alternate" type="text/html"/>
  <updated>2008-09-25T19:38:33Z</updated>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-09-25:255</id>
    <published>2008-09-25T19:36:00Z</published>
    <updated>2008-09-25T19:38:33Z</updated>
    <category term="misc"/>
    <category term="bsu"/>
    <category term="BSU"/>
    <link href="http://justinbkay.org/2008/9/25/scores-on-broncodashboard-com" rel="alternate" type="text/html"/>
    <title>Scores on BroncoDashboard.com</title>
<content type="html">
            &lt;p&gt;I've added a new page to broncodashboard.com.  I'm grabbing scores for the WAC games and other teams that I find interesting so that I can check them in one place.  It is kind of a personal scoreboard, but I thought I'd put it out there for the general consumption.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-09-17:185</id>
    <published>2008-09-17T16:23:00Z</published>
    <updated>2008-09-17T16:25:32Z</updated>
    <category term="misc"/>
    <category term="Ruby on Rails"/>
    <category term="development"/>
    <link href="http://justinbkay.org/2008/9/17/mydaddypuzzles-and-extreme-makeover-home-edition" rel="alternate" type="text/html"/>
    <title>MyDaddyPuzzles and Extreme Makeover Home Edition</title>
<content type="html">
            &lt;p&gt;
MyDaddyPuzzles are being used in the upcoming Season Premier of Extreme Makeover Home Edition.  You can read about it &lt;a href=&quot;http://mydaddypuzzles.com/puzzle/extreme_makeover&quot;&gt;here&lt;/a&gt;. 
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-09-16:183</id>
    <published>2008-09-16T15:10:00Z</published>
    <updated>2008-09-16T15:19:35Z</updated>
    <category term="Ruby on Rails"/>
    <category term="deployment"/>
    <link href="http://justinbkay.org/2008/9/16/rails-nginx-and-ssl" rel="alternate" type="text/html"/>
    <title>rails, nginx, and SSL</title>
<content type="html">
            &lt;p&gt;
This week I decided to buy an ssl certificate to start using with one of my websites.  The site is running Rails 2.1.1, behind &lt;a href=&quot;http://wiki.codemongers.com/Main&quot;&gt;nginx&lt;/a&gt; as a reverse proxy.  It was a learning experience to be sure and I'll try to document some of the steps that I had to take to get it working.  
&lt;/p&gt;

&lt;p&gt;
The first trick was getting the ca-bundle.crt file to be served by nginx.  This is the intermediate ca file that allows browsers to recognize your certificate authority.  The trick is to concatonate your certificate file and the ca-bundle.crt file and then place them on the webserver.  I found that tidbit &lt;a href=&quot;http://hostingfu.com/article/godaddy-turbossl-certificate-nginx&quot;&gt;here&lt;/a&gt;.  With Apache, you have a server directive for the ca-bundle file so this step is not necessary.
&lt;/p&gt;

&lt;p&gt;
The next trick was to get nginx to let the rails app know what protocol was being used when requests came in using ssl.  The magic is this line in the nginx.conf file &lt;pre&gt; proxy_set_header X-FORWARDED_PROTO https; &lt;/pre&gt; which I found &lt;a href=&quot;http://rubyjudo.com/2006/11/2/nginx-ssl-rails&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
You also need to install the ssl_requirement plugin: &lt;strong&gt;ruby script/plugin install ssl_requirement&lt;/strong&gt;.  Which you can read about &lt;a href=&quot;http://wiki.rubyonrails.org/rails/pages/HowToEnableSSL&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
Last, but not least, you need to tell nginx to turn on ssl and let it know where your certificates are, which is documented &lt;a href=&quot;http://articles.slicehost.com/2007/12/19/ubuntu-gutsy-nginx-ssl-and-vhosts&quot;&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
That should about get you going with nginx, rails, and 3rd party ssl certificates.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-09-10:178</id>
    <published>2008-09-10T16:25:00Z</published>
    <updated>2008-09-10T16:27:39Z</updated>
    <category term="Ruby on Rails"/>
    <category term="development"/>
    <link href="http://justinbkay.org/2008/9/10/ical-is-back" rel="alternate" type="text/html"/>
    <title>ical is back</title>
<content type="html">
            &lt;p&gt;
I found a free host for the iCal calendar of the broncodashboard.com iCal.  So, it has been added back onto broncodashboard.com.  I also added a scoreboard page that auto-updates with some WAC scores as well as some other teams that I like to follow.  I used Hpricot, the Ruby library to gather the scores from espn.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-08-29:144</id>
    <published>2008-08-29T20:30:00Z</published>
    <updated>2008-08-29T20:39:09Z</updated>
    <category term="Ruby on Rails"/>
    <category term="development"/>
    <link href="http://justinbkay.org/2008/8/29/rails-printer-icon-helper" rel="alternate" type="text/html"/>
    <title>rails printer icon helper</title>
<content type="html">
            I had occasion to need to add a printer icon to some web pages in one of my Rails apps this week.  I found a nice free icon at &lt;a href=&quot;http://www.famfamfam.com/&quot;&gt;famfamfam.com&lt;/a&gt; for the printer.  I added the link and javascript and it worked.  I decided that it would be a nice idea to make a helper for this so I could easily duplicate it on other pages.  Here it is:

&lt;pre&gt;

# in application_helper.rb
def printer_icon(top=50, left=550)
    &quot;&amp;lt;a href=\&quot;#\&quot; id=\&quot;printer_icon\&quot; style=\&quot;position: absolute; top: #{top}px; left: #{left}px;\&quot; onClick=\&quot;window.print();return false;\&quot;&gt;#{image_tag 'printer.png'} &amp;lt;/a&amp;gt;&quot;
end

#usage 
&amp;lt;%= printer_icon %&gt;

&lt;/pre&gt;

Works great.
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-08-20:129</id>
    <published>2008-08-20T02:58:00Z</published>
    <updated>2008-08-20T03:01:42Z</updated>
    <category term="misc"/>
    <category term="disaster"/>
    <link href="http://justinbkay.org/2008/8/20/mini-server-looks-like-bad-hd" rel="alternate" type="text/html"/>
    <title>Mini Server -- looks like bad hd</title>
<content type="html">
            My 1.25 gz mini is failing.  Not sure, but I think the HD is toast.  Too bad, I'm losing a log of data...  I knew I should have backed that thing up.
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-06-25:122</id>
    <published>2008-06-25T14:51:00Z</published>
    <updated>2008-06-25T14:54:16Z</updated>
    <category term="Family"/>
    <category term="forsale"/>
    <link href="http://justinbkay.org/2008/6/25/house-for-sale" rel="alternate" type="text/html"/>
    <title>House For Sale</title>
<content type="html">
            &lt;p&gt;So, I had a meeting last evening and didn't get home until about 9pm.  When I rolled up to the house, I couldn't help but notice that there was a for sale by owner sign in my front yard.  That was a surprise.&lt;/p&gt;
&lt;p&gt;
The market is pretty bad right now, so I don't really expect that much will come of this, but it is kind of exciting.  Potentially homeless.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-06-20:121</id>
    <published>2008-06-20T20:50:00Z</published>
    <updated>2008-06-20T20:56:13Z</updated>
    <category term="Ruby on Rails"/>
    <category term="development"/>
    <link href="http://justinbkay.org/2008/6/20/rails-2-1" rel="alternate" type="text/html"/>
    <title>Rails 2.1</title>
<content type="html">
            &lt;p&gt;Biggest issue for me with the upgrading to Rails 2.1 from 2.0.2 seems to be the eager loading.  Where I have used :include =&gt; :some_association in my find code and haven't put the full tablename.column syntax in my :conditions SQL, the table doesn't get loaded and errors occur, so I've been busy adding included table names to my conditions strings.
&lt;/p&gt;
&lt;p&gt;
Rails 2.1 also seems to have different behavior when it comes to how dates are handled.  If a partial date is input, I end up with some weird dates instead of seeing the multi-param error that I used to see.  Not sure I'm liking that very much.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-06-13:120</id>
    <published>2008-06-13T15:20:00Z</published>
    <updated>2008-09-25T19:36:04Z</updated>
    <category term="Family"/>
    <category term="apple"/>
    <link href="http://justinbkay.org/2008/6/13/apple-tv" rel="alternate" type="text/html"/>
    <title>Apple TV</title>
<content type="html">
            &lt;p&gt;I have my first media center now.  It comes in the form of an Apple TV.  I have hacked it to allow uploading of movies that are not synced with my iTunes.  This was necessary because my mac mini hard disk is full.  So far I'm really liking it.  I do wish that it had a larger hard drive.  It is the 40gb model.  It will be great to have all of the kids movies on there so they can watch them without destroying any more dvd discs.  We really need to get an iMac with a good sized drive.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-21:116</id>
    <published>2008-05-21T16:55:00Z</published>
    <updated>2008-05-21T16:57:03Z</updated>
    <category term="misc"/>
    <category term="deployment"/>
    <link href="http://justinbkay.org/2008/5/21/redirecting-uploads-to-merb" rel="alternate" type="text/html"/>
    <title>redirecting uploads to merb</title>
<content type="html">
            &lt;p&gt;
I have a &lt;a href=&quot;http://rubyonrails.org&quot;&gt;rails&lt;/a&gt; app for which I am using &lt;a href=&quot;http://merbivore.com&quot;&gt;merb&lt;/a&gt; to handle the file uploading duties.  I am using &lt;a href=&quot;http://wiki.codemongers.com/Main&quot;&gt;nginx&lt;/a&gt; as the webserver to proxy to the rails app.  So here is the little bit of config from the nginx.conf that grabs the url that matches and sends it off to merb.  This bit of code is in the location block.
&lt;/p&gt;
&lt;pre&gt;

if ($uri = /upload/acceptor) {
        proxy_pass http://applicationserver:4010;
        break;
   }


&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-19:115</id>
    <published>2008-05-19T14:49:00Z</published>
    <updated>2008-09-12T02:26:58Z</updated>
    <category term="misc"/>
    <category term="development"/>
    <category term="web"/>
    <link href="http://justinbkay.org/2008/5/19/new-style-web-content" rel="alternate" type="text/html"/>
    <title>New style web content</title>
<content type="html">
            &lt;p&gt;I really like what &lt;a href=&quot;http://www.apture.com/&quot;&gt;these guys&lt;/a&gt; are doing with the web.  They can put links into small windows that pop open and give you extra information about things on the page, but you stay on the page and you get nice control over the linked content.  Very nice way to have supplementary info linked on a page.
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-13:114</id>
    <published>2008-05-13T02:49:00Z</published>
    <updated>2008-09-21T22:24:54Z</updated>
    <category term="mtn biking"/>
    <category term="crash"/>
    <link href="http://justinbkay.org/2008/5/13/third-ride" rel="alternate" type="text/html"/>
    <title>third ride</title>
<content type="html">
            &lt;p&gt;rode from military reserve up around shane's loop and back down.  On the way down I had a pretty good spill.  I can't sit very well.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-13:113</id>
    <published>2008-05-13T02:48:00Z</published>
    <updated>2008-09-24T15:50:45Z</updated>
    <category term="mtn biking"/>
    <link href="http://justinbkay.org/2008/5/13/second-ride" rel="alternate" type="text/html"/>
    <title>Second Ride</title>
<content type="html">
            &lt;p&gt;started at military reserve dirt lot and rode up to shane's loop.
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-09:112</id>
    <published>2008-05-09T02:47:00Z</published>
    <updated>2008-09-21T22:24:57Z</updated>
    <category term="mtn biking"/>
    <link href="http://justinbkay.org/2008/5/9/first-ride" rel="alternate" type="text/html"/>
    <title>First Ride</title>
<content type="html">
            &lt;p&gt;First Ride of the year was a green belt trip up around barber park from park center&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://justinbkay.org/">
    <author>
      <name>justin</name>
    </author>
    <id>tag:justinbkay.org,2008-05-07:111</id>
    <published>2008-05-07T15:38:00Z</published>
    <updated>2008-05-07T15:40:54Z</updated>
    <category term="Ruby"/>
    <category term="Ruby on Rails"/>
    <category term="development"/>
    <link href="http://justinbkay.org/2008/5/7/ruby-business-days-in-the-future-2" rel="alternate" type="text/html"/>
    <title>Ruby Business Days in the Future</title>
<content type="html">
            &amp;lt;link href=&quot;/stylesheets/textmate.css&quot; /&gt;
&lt;p&gt;Going the other way now&lt;/p&gt;

&lt;pre class=&quot;textmate-source vibrant_ink&quot;&gt;

&lt;span class=&quot;linenum&quot;&gt;    1&lt;/span&gt; &lt;span class=&quot;source source_ruby source_ruby_rails&quot;&gt;&lt;span class=&quot;meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby&quot;&gt;&lt;span class=&quot;keyword keyword_control keyword_control_def keyword_control_def_ruby&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_ruby&quot;&gt;business_days_future&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;variable variable_parameter variable_parameter_function variable_parameter_function_ruby&quot;&gt;num&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby&quot;&gt;,&lt;/span&gt;start_date&lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;constant constant_language constant_language_ruby&quot;&gt;nil&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;    2&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt; takes the number of days in the past you are looking for
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;    3&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt; like 10 business days ago
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;    4&lt;/span&gt;   start_date &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;||=&lt;/span&gt; &lt;span class=&quot;support support_class support_class_ruby&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;today
&lt;span class=&quot;linenum&quot;&gt;    5&lt;/span&gt;   start_day_of_week &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; start_date&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;cwday &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;Date.today.cwday
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;    6&lt;/span&gt;   ans &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;    7&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt; find the number of weeks
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;    8&lt;/span&gt;   weeks &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; num &lt;span class=&quot;keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5.0&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;    9&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;yields #{weeks} weeks&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   10&lt;/span&gt;     
&lt;span class=&quot;linenum&quot;&gt;   11&lt;/span&gt;   temp_num &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; num &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby&quot;&gt;:&lt;/span&gt; num
&lt;span class=&quot;linenum&quot;&gt;   12&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;first temp num #{temp_num}&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   13&lt;/span&gt;   
&lt;span class=&quot;linenum&quot;&gt;   14&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;begin&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   15&lt;/span&gt;     
&lt;span class=&quot;linenum&quot;&gt;   16&lt;/span&gt;     ans &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; days_to_adjust_f&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;start_day_of_week&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby&quot;&gt;,&lt;/span&gt;temp_num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   17&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;    &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;ans in loop #{ans}&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   18&lt;/span&gt;     
&lt;span class=&quot;linenum&quot;&gt;   19&lt;/span&gt;     weeks &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1.0&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   20&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;    &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;weeks in loop #{weeks}&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   21&lt;/span&gt;     
&lt;span class=&quot;linenum&quot;&gt;   22&lt;/span&gt;     temp_num &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;weeks &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;&amp;gt;=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby&quot;&gt;:&lt;/span&gt; num &lt;span class=&quot;keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   23&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;    &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;temp_num after loop #{temp_num}&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   24&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;while&lt;/span&gt; weeks &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   25&lt;/span&gt;   
&lt;span class=&quot;linenum&quot;&gt;   26&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;  &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;puts &quot;#{start_date} - #{num} - #{ans}&quot;
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   27&lt;/span&gt;   days_ago &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; start_date &lt;span class=&quot;keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby&quot;&gt;+&lt;/span&gt; num &lt;span class=&quot;keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby&quot;&gt;+&lt;/span&gt; ans
&lt;span class=&quot;linenum&quot;&gt;   28&lt;/span&gt;   
&lt;span class=&quot;linenum&quot;&gt;   29&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   30&lt;/span&gt; 
&lt;span class=&quot;linenum&quot;&gt;   31&lt;/span&gt; 
&lt;span class=&quot;linenum&quot;&gt;   32&lt;/span&gt; 
&lt;span class=&quot;linenum&quot;&gt;   33&lt;/span&gt; &lt;span class=&quot;meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby&quot;&gt;&lt;span class=&quot;keyword keyword_control keyword_control_def keyword_control_def_ruby&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;entity entity_name entity_name_function entity_name_function_ruby&quot;&gt;days_to_adjust_f&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;variable variable_parameter variable_parameter_function variable_parameter_function_ruby&quot;&gt;start_day_of_week&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_object punctuation_separator_object_ruby&quot;&gt;,&lt;/span&gt;num&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   34&lt;/span&gt;   ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   35&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;case&lt;/span&gt; start_day_of_week
&lt;span class=&quot;linenum&quot;&gt;   36&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   37&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt; &lt;span class=&quot;keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby&quot;&gt;==&lt;/span&gt; num &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   38&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   39&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;include?&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   40&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;3&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   41&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;include?&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   42&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;4&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   43&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;include?&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   44&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   45&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;include?&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   46&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;6&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   47&lt;/span&gt;     &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;..&lt;/span&gt;&lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby&quot;&gt;.&lt;/span&gt;include?&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;(&lt;/span&gt;num&lt;span class=&quot;punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;then&lt;/span&gt; ansr &lt;span class=&quot;keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_augmented keyword_operator_assignment_augmented_ruby&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   48&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;when&lt;/span&gt; &lt;span class=&quot;constant constant_numeric constant_numeric_ruby&quot;&gt;7&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   49&lt;/span&gt; &lt;span class=&quot;comment comment_line comment_line_number-sign comment_line_number-sign_ruby&quot;&gt;    &lt;span class=&quot;punctuation punctuation_definition punctuation_definition_comment punctuation_definition_comment_ruby&quot;&gt;#&lt;/span&gt;do nothing 
&lt;/span&gt;&lt;span class=&quot;linenum&quot;&gt;   50&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;linenum&quot;&gt;   51&lt;/span&gt;   &lt;span class=&quot;keyword keyword_control keyword_control_pseudo-method keyword_control_pseudo-method_ruby&quot;&gt;return&lt;/span&gt; ansr
&lt;span class=&quot;linenum&quot;&gt;   52&lt;/span&gt; &lt;span class=&quot;keyword keyword_control keyword_control_ruby&quot;&gt;end&lt;/span&gt;&lt;/span&gt;

&lt;/pre&gt;
          </content>  </entry>
</feed>
