<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>not so silent (e) &#187; tips</title>
	<atom:link href="http://notso.silent-e.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://notso.silent-e.com</link>
	<description>Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss</description>
	<lastBuildDate>Wed, 25 Aug 2010 22:32:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>how to think of &#8220;git diff&#8221; using branch names</title>
		<link>http://notso.silent-e.com/2009/10/26/how-to-think-of-git-diff-using-branch-names/</link>
		<comments>http://notso.silent-e.com/2009/10/26/how-to-think-of-git-diff-using-branch-names/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 23:01:19 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[note to self]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=798</guid>
		<description><![CDATA[This post is more of a note to myself to remember how to think of certain git diff commands but it might be useful to other newbie-ish users of git. This is from my own experimentation, since I couldn&#8217;t find a good newbie-understandable explanation of this on the Interwebs. git diff &#60;branch name&#62; &#8211; means [...]]]></description>
			<content:encoded><![CDATA[<p>This post is more of a note to myself to remember how to think of certain git diff commands but it might be useful to other newbie-ish users of git.  This is from my own experimentation, since I couldn&#8217;t find a good newbie-understandable explanation of this on the Interwebs.</p>
<p><strong><em>git diff &lt;branch name&gt;</em></strong> &#8211; means what would change if we applied the current working HEAD of the branch we are on, including all unstaged/uncommitted changes, to the named branch.</p>
<p><strong><em>git diff &lt;branch 1&gt; &lt;branch 2&gt;</em></strong> &#8211; means what would change if we applied &lt;branch 2&gt; onto &lt;branch 1&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/10/26/how-to-think-of-git-diff-using-branch-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Snarl and autotest_menu in windows</title>
		<link>http://notso.silent-e.com/2009/04/09/fixing-snarl-and-autotest-menu-in-windows/</link>
		<comments>http://notso.silent-e.com/2009/04/09/fixing-snarl-and-autotest-menu-in-windows/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 19:33:24 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[me me me]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=721</guid>
		<description><![CDATA[I&#8217;ve been trying to get ZenSpider autotest and Windows to play nice for a while. First, I had the problem where autotest would only run once and not stick around waiting for updates to my code. That was fixed by Luke Pearce. He commented on a previous post with his fix and I can confirm [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get ZenSpider autotest and Windows to play nice for a while.  First, I had the problem where autotest would only run once and not stick around waiting for updates to my code.  That was fixed by <a href="http://www.kulesolutions.com/" target="_blank">Luke Pearce</a>.  He <a href="http://notso.silent-e.com/2009/04/06/turning-off-the-rails-232-backtracecleaner/#comment-9523" target="_blank">commented on a previous post</a> with his fix and I can confirm that it works.  Thanx Luke!</p>
<p>I encountered another problem now.  When I ran my autotest but tried to shut it down by hitting Control-C twice in a row, the tests would just reset and run again.  Double Control-C is supposed to interrupt the process and allow me to shut it down.  This it did not do.<br />
<span id="more-721"></span><br />
I am also running the autotest/menu plugin that is supposed to explicitly ask you whether you want to quit, restart or just keep going when you hit Control-C, even if it&#8217;s just hitting it once.  This is the best possible option and is what I recommend, but it wasn&#8217;t happening.  There were no prompts to quit, continue, or restart.  Just restarting the entire test suite EVERY time I hit Control-C, whether it was two quick hits or 10 hits a row.</p>
<p>I originally looked at the code thinking that I should fix it there.  Autotest provides hooks into it&#8217;s process.  Run, interrupt, quit, etc.  I figured it had to do with one of those so I first tried just commenting out the :interrupt hook code on lines 39-41 in ZenTest-4.0.0/lib/autotest/snarl.rb.  This worked and I was happy.  However it still didn&#8217;t feel right.  I didn&#8217;t want to hack the code and ask them to fix it.  It must be working for other people because I haven&#8217;t seen other people complaining about it.</p>
<p>Turns out the fix is a really easy one and requires no hacking on the gem code at all.  It was just a problem with the order of my &#8220;require&#8221; lines in my .autotest file.  My original .autotest file looked like this&#8230;</p>
<p><code>require 'redgreen/autotest'<br />
require 'Win32/Console/ANSI'<br />
require 'autotest/snarl'<br />
require 'autotest/menu'<br />
require 'autotest/timestamp'</code></p>
<p>The .autotest file that WORKS swaps the &#8220;snarl&#8221; and &#8220;menu&#8221; lines around, like so&#8230;</p>
<p><code>require 'redgreen/autotest'<br />
require 'Win32/Console/ANSI'<br />
require 'autotest/menu'<br />
require 'autotest/snarl'<br />
require 'autotest/timestamp'</code></p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/04/09/fixing-snarl-and-autotest-menu-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning off the Rails 2.3.2 BacktraceCleaner</title>
		<link>http://notso.silent-e.com/2009/04/06/turning-off-the-rails-232-backtracecleaner/</link>
		<comments>http://notso.silent-e.com/2009/04/06/turning-off-the-rails-232-backtracecleaner/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 23:27:38 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[me me me]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=714</guid>
		<description><![CDATA[I had a situation today where, when running some functional tests, the error backtrace being displayed was not helpful at ALL. I was defining a layout for a controller as a symbol instead of a string like I should have been using. You use a string when you are just saying &#8220;Use this layout&#8221; and [...]]]></description>
			<content:encoded><![CDATA[<p>I had a situation today where, when running some functional tests, the error backtrace being displayed was not helpful at ALL.  I was defining a layout for a controller as a symbol instead of a string like I should have been using.  You use a string when you are just saying &#8220;Use this layout&#8221; and you use a symbol when you have a method to call that responds with the layout to use.  The error I was getting was &#8230;</p>
<p><code>NoMethodError: undefined method `admin' for #&lt;Admin::RegistrationsController&gt;</code></p>
<p>but what was the first line that came up in the backtrace?</p>
<p><code>app/controllers/admin/registrations_controller.rb:18:in `show'</code></p>
<p>This was giving me fits.  There&#8217;s no call to &#8216;admin&#8217; in the &#8216;show&#8217; method.  I knew there had to be something else so I searched for how to see more of the backtrace.</p>
<p>The BacktraceCleaner <a href="http://guides.rubyonrails.org/2_3_release_notes.html#quieter-backtraces" target="_blank">introduced in Rails 2.3.2</a> cleans out backtrace lines coming from the Rails framework (Railties, etc).  This is usually what you want.  However, I was sure that my error was coming from somewhere in the framework.  Turns out it&#8217;s really simple to turn off the backtrace cleaner.  Add this line in a &#8216;setup&#8217; method in your test_helper.rb file.</p>
<p><code>Rails.backtrace_cleaner.remove_silencers!</code></p>
<p>Very simple, very easy.  My name is Chef Tell.  <img src='http://notso.silent-e.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/04/06/turning-off-the-rails-232-backtracecleaner/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rails 2.3.2 and testing with assert_select_email</title>
		<link>http://notso.silent-e.com/2009/04/02/rails-232-and-testing-with-assert_select_email/</link>
		<comments>http://notso.silent-e.com/2009/04/02/rails-232-and-testing-with-assert_select_email/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 22:38:48 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/2009/04/02/rails-232-and-testing-with-assert_select_email/</guid>
		<description><![CDATA[I upgraded a project to Rails 2.3.2 a while back and have been getting the following error when running some unit tests&#8230; NoMethodError: undefined method `assert_select_email' for #&#60;UserMailerTest&#62; I posted to the rubyonrails-talk google group but never got a response, and I was not the first to post about this problem to that group. However [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded a project to Rails 2.3.2 a while back and have been getting the following error when running some unit tests&#8230;</p>
<p><code>NoMethodError: undefined method `assert_select_email' for #&lt;UserMailerTest&gt;</code></p>
<p>I <a href="http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/fabaf2c73943e268" target="_blank">posted to the rubyonrails-talk google group</a> but never got a response, and I was not the first to post about this problem to that group.  However I found someone else commenting on this in an <a href="https://rspec.lighthouseapp.com/projects/5645/tickets/736-no-access-to" target="_blank">rspec lighthouse ticket</a> and they&#8217;d fixed it for their setup.  It was an easy conversion to non-rspec and here&#8217;s the line you need to add to your test/test_helper.rb file</p>
<p><code>include ActionController::Assertions::SelectorAssertions</code></p>
<p>I&#8217;m not sure why it&#8217;s broken but it appears to have regressed in one of the Rails 2.3.2 RCs.</p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/04/02/rails-232-and-testing-with-assert_select_email/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade your Flash Player</title>
		<link>http://notso.silent-e.com/2009/02/25/upgrade-your-flash-player/</link>
		<comments>http://notso.silent-e.com/2009/02/25/upgrade-your-flash-player/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 01:28:43 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=677</guid>
		<description><![CDATA[Due to a security hole, Adobe is recommending people upgrade their Flash Player. Go here to see what version you are running. If your player version doesn&#8217;t match the version listed on this page, then you need to upgrade your flash player.]]></description>
			<content:encoded><![CDATA[<p><img src="/images/flashplayer_100x100.jpg" alt="Flash" title="Flash" class="clean right" />Due to a security hole, Adobe is recommending people upgrade their Flash Player.  <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15507" target="_blank">Go here to see what version you are running</a>.  If your player version doesn&#8217;t match the version listed <a href="http://get.adobe.com/flashplayer/" target="_blank">on this page</a>, then you need to upgrade your flash player.</p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/02/25/upgrade-your-flash-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What you shouldn&#8217;t put on a credit card swiper</title>
		<link>http://notso.silent-e.com/2009/01/16/what-you-shouldnt-put-on-a-credit-card-swiper/</link>
		<comments>http://notso.silent-e.com/2009/01/16/what-you-shouldnt-put-on-a-credit-card-swiper/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 03:27:28 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wtf?]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/2009/01/16/what-you-shouldnt-put-on-a-credit-card-swiper/</guid>
		<description><![CDATA[I uploaded this through]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/silent_e/3202218785/" title="flickr photo"><img src="http://farm4.static.flickr.com/3107/3202218785_621ef1fe7c.jpg" class="flickr-photo" alt="What you shouldn't put on a credit card swiper" title="What you shouldn't put on a credit card swiper" /></a></p>
<p class="flickr-yourcomment">
<p>I uploaded this through <a href="http://www.flickr.com/photos/silent_e/"><img alt="flickr" title="flickr" class="clean" src="http://www.flickr.com/images/flickr_logo_blog.gif" width="41" height="18" border="0" align="absmiddle" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2009/01/16/what-you-shouldnt-put-on-a-credit-card-swiper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caution&#8230;</title>
		<link>http://notso.silent-e.com/2008/12/30/caution/</link>
		<comments>http://notso.silent-e.com/2008/12/30/caution/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 22:35:47 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[photography]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/2008/12/30/caution/</guid>
		<description><![CDATA[&#8230; when playing football, do not punt a brick! I uploaded this through]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/silent_e/3152026668/" title="flickr photo"><img src="http://farm4.static.flickr.com/3268/3152026668_669eabbea2.jpg" class="flickr-photo" alt="Caution..." title="Caution..." /></a></p>
<p class="flickr-yourcomment">&#8230; when playing football, do not punt a brick!</p>
<p>I uploaded this through <a href="http://www.flickr.com/photos/silent_e/"><img alt="flickr" title="flickr" class="clean" src="http://www.flickr.com/images/flickr_logo_blog.gif" width="41" height="18" border="0" align="absmiddle" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2008/12/30/caution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I block people from visiting a website</title>
		<link>http://notso.silent-e.com/2008/11/24/how-i-block-people-from-visiting-a-website/</link>
		<comments>http://notso.silent-e.com/2008/11/24/how-i-block-people-from-visiting-a-website/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:31:37 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=622</guid>
		<description><![CDATA[Inspired by the article Block a Website for Everyone But You over at CSS Tricks, I thought I&#8217;d post my way of blocking people from accessing my websites while I work on them. Chris Coyier over at CSS Tricks uses the following code in his .htaccess file to block visitors. RewriteEngine On RewriteBase / RewriteCond [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by the article <a href="http://css-tricks.com/block-a-website-for-everyone-but-you/" target="_blank">Block a Website for Everyone But You</a> over at CSS Tricks, I thought I&#8217;d post my way of blocking people from accessing my websites while I work on them.</p>
<p>Chris Coyier over at CSS Tricks uses the following code in his .htaccess file to block visitors.</p>
<p><code>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REMOTE_HOST} !^71\.225\.113\.171<br />
RewriteCond %{REMOTE_HOST} !^71\.185\.239\.212<br />
RewriteCond %{REMOTE_HOST} !^69\.253\.223\.254<br />
RewriteCond %{REQUEST_URI} !/comingsoon\.html$<br />
RewriteRule .* /comingsoon.html [R=302,L]<br />
</code></p>
<p>What he&#8217;s doing there is checking for specific IP addresses that are allowed to see the website but everyone else is sent to the &#8220;comingsoon.html&#8221; webpage.  This is great for people who have specific IP addresses but if you&#8217;re behind a proxy like I am at work then everyone else with you behind that proxy can still see the site.</p>
<p>I find it much easier to redirect everyone but check for a custom cookie that I can set using the <a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Webdeveloper Firefox extension</a>.  That way I can check to make sure that the redirect to the maintenance page is actually working.  Here&#8217;s the relevant code that I use (taken from a RoR tutorial of old)</p>
<p><code>RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f<br />
RewriteCond %{SCRIPT_FILENAME} !maintenance.html<br />
RewriteCond %{HTTP_COOKIE} !^.*access_cookie=1.*$<br />
RewriteRule ^.*$ /maintenance.html [L]<br />
</code></p>
<p>where the text &#8220;access_cookie&#8221; (sans quotes) would be whatever cookie name you want to use.  I just create a &#8220;session cookie&#8221; set to a value of &#8220;1&#8243; (or whatever you want to make it) and check for it&#8217;s existence.</p>
<p>That gets around the problem of DHCP granted or spoofed IP addresses.  Sure a cookie is easy to add but if you make the name and/or value sufficiently difficult to guess, no one is getting in.</p>
<p>Now just add your cookie.</p>
<p><img src="http://notso.silent-e.com/images/add_cookie.png" class="clean" /></p>
<p>Note in the image that I have set it to be a &#8220;session cookie&#8221;.  This helps when you forget to delete the cookie.  Just close your tab (FF) or browser (IE), reopen it and the cookie will be gone.</p>
<p>Oh yeah.  The other thing that my .htaccess code does is, on the first line, check for the existence of the &#8220;maintenance.html&#8221; file.  I don&#8217;t want to have to add and remove this code everytime I want to take the site down.  It&#8217;s much easier to just have this code permanently in my .htaccess file and then upload the file that people will see when the site is down.  I then delete it when the site is ready to be reopened.  This is all performed using a custom Capistrano command that I run when I&#8217;m ready to deploy a new version.</p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2008/11/24/how-i-block-people-from-visiting-a-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The scariest horror movie I&#8217;ve ever seen</title>
		<link>http://notso.silent-e.com/2008/10/31/the-scariest-horror-movie-ive-ever-seen/</link>
		<comments>http://notso.silent-e.com/2008/10/31/the-scariest-horror-movie-ive-ever-seen/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 19:42:16 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/?p=608</guid>
		<description><![CDATA[A perfect scare for Halloween.  For me, this has got to be one of the scariest videos ever. Please vote on November 4th.]]></description>
			<content:encoded><![CDATA[<p>A perfect scare for Halloween.  For me, <a href="http://adsoftheworld.com/media/tv/public_awareness_palin">this has got to be one of the scariest videos</a> ever.  <img src='http://notso.silent-e.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Please vote on November 4th.</p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2008/10/31/the-scariest-horror-movie-ive-ever-seen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visit this site if you are feeling down or just need to laugh your ass off</title>
		<link>http://notso.silent-e.com/2008/10/23/visit-this-site-if-you-are-feeling-down-or-just-need-to-laugh-your-ass-off/</link>
		<comments>http://notso.silent-e.com/2008/10/23/visit-this-site-if-you-are-feeling-down-or-just-need-to-laugh-your-ass-off/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:47:35 +0000</pubDate>
		<dc:creator>matte</dc:creator>
				<category><![CDATA[funny]]></category>
		<category><![CDATA[pets]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://notso.silent-e.com/2008/10/23/visit-this-site-if-you-are-feeling-down-or-just-need-to-laugh-your-ass-off/</guid>
		<description><![CDATA[Blender Defender or how to keep cats off the counter]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.plasma2002.com/blenderdefender/" target="_blank">Blender Defender or how to keep cats off the counter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://notso.silent-e.com/2008/10/23/visit-this-site-if-you-are-feeling-down-or-just-need-to-laugh-your-ass-off/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
