<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>brighter.net</title>
    <link>http://brighter.net</link>
    <language>en</language>
    <webMaster>jacqui@brighter.net (jacqui maher)</webMaster>
    <copyright>Copyright 2007-2008</copyright>
    <ttl>60</ttl>
    <pubDate>Sat, 14 Jun 2008 05:52:03 GMT</pubDate>
    <description>searching for a better fate than wisdom</description>
    <item>
      <title>the joy of apartment hunting in nyc</title>
      <link>http://brighter.net/past/2008/6/14/the_joy_of_apartment_hunting/</link>
      <pubDate>Sat, 14 Jun 2008 05:45:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/6/14/the_joy_of_apartment_hunting/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;While I don&amp;#8217;t have to start looking for a new place just yet, I am going to be moving out of my current digs pretty soon. There&amp;#8217;s just something about NYC real estate that I find captivating, and I know &lt;a href="http://curbed.com/"&gt;I&amp;#8217;m not the only one who thinks so&lt;/a&gt;. &lt;br/&gt;&lt;br/&gt;I really would prefer not to continue paying the high rents of Park Slope, so I&amp;#8217;ve started to look in other neighborhoods. This morning I went out on my bike and checked out Prospect Lefferts Gardens, Crown Heights, Bed-Stuy, Clinton Hill and Fort Greene. I came home and decided to look up some places to see what the rents were like, and how the brokers&amp;#8217; descriptions gelled with what I saw and thought.&lt;br/&gt;&lt;br/&gt;Then I saw this:&lt;br/&gt;&lt;br/&gt;&lt;img src="http://img.skitch.com/20080614-nfhqfcd9btc8u54s1pq1i65kwt.png"/&gt;&lt;br/&gt;&lt;br/&gt;I think 90% of the brokers in NYC are on mind altering drugs. Seriously, the suspension of disbelief is remarkably strong with them!&lt;br/&gt;&lt;br/&gt;In other news, I&amp;#8217;ve been busy and distracted lately and not doing anything with this site. I&amp;#8217;m hoping - really - to fix this up before I leave for Africa. In fact, I&amp;#8217;m going to be setting up a separate section for updates from East Africa; I&amp;#8217;m not sure what my internet connectivity will be like there, especially as I plan on being in some rather remote areas, but I bet I&amp;#8217;ll be able to post at least once or twice from there.&lt;br/&gt;&lt;br/&gt;Til then, thanks for all the replies on my previous post. I&amp;#8217;m taking all the advice into consideration for when I finally sit down and work on brighter.&lt;br/&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/nyc">nyc</category>
    </item>
    <item>
      <title>where'd my css go? or: a call for advice</title>
      <link>http://brighter.net/past/2008/5/7/host_setup_advice/</link>
      <pubDate>Wed, 07 May 2008 03:55:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/5/7/host_setup_advice/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;Huh, I somehow lost my custom CSS for this site. Probably when I was updating Simplelog&amp;#8230; I don&amp;#8217;t (obviously) have a very good, backed-up setup for my SliceHost. Argh!&lt;br/&gt;&lt;br/&gt;This brings me to several questions I&amp;#8217;ve been wanting to ask the world of talented developers I know (yes you!):&lt;br/&gt;&lt;br/&gt;What are you guys using?&lt;br/&gt;&lt;br/&gt;I&amp;#8217;m curious about directory structures - should I put my sites in my home directory? /usr/local? /www? &lt;br/&gt;&lt;br/&gt;What about version control? When you&amp;#8217;re using third party apps (like SimpleLog) that are themselves hosted in version control systems like svn or git, do you then export or clone them and stick them in your own local SCM, or perhaps github? &lt;br/&gt;&lt;br/&gt;Web servers? Is everyone on Nginx? What are your configs like for it? Did you use ErrTheBlog&amp;#8217;s Nginx config generator to start off? I know some people who use LightSpeed and that looks snazzy.&lt;br/&gt;&lt;br/&gt;And how about your dot files? I&amp;#8217;m talking about .vimrc, .irbrc, .bashrc/.tchsrc/etc. I made a repo in my github acct for these, but it seems like overkill. How should I deploy that anyway? A lot of dotfiles go into their own directories, and I&amp;#8217;m not sure how best to structure my repo for it.&lt;br/&gt;&lt;br/&gt;There&amp;#8217;s a lot of ground to cover here, I guess. Help :)&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/advice">advice</category>
    </item>
    <item>
      <title>I love bike riding</title>
      <link>http://brighter.net/past/2008/5/1/first_post_on_biking/</link>
      <pubDate>Thu, 01 May 2008 10:07:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/5/1/first_post_on_biking/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;and now I&amp;#8217;m going to blog about it. Riding in NYC is a bit tricky - while it&amp;#8217;s great to be able to pass tons of traffic and feel the breeze in your hair along the Hudson River Park path, it also sucks to have tourists driving SUVs and insane cab drivers almost kill you, sometimes several times in a single block. The dangers come from both obliviousness and malevolence on the part of (mostly) drivers and (somewhat) pedestrians, and, yes, rarely, other bicyclists. &lt;br/&gt;&lt;br/&gt;I started riding into work because I found, upon returning to NYC after 4.5 years in California, that the quality and reliability of the subway system had taken a severe turn for the worse. (seriously, wtf happened in so short a time? am I being nostalgic, or has it really gotten a lot worse?) Now that I&amp;#8217;ve known the fun and fresh air of commuting by bike, though, the subway is pretty much intolerable.&lt;br/&gt;&lt;br/&gt;I just hate standing around, waiting. The one thing I miss is the amount of time I&amp;#8217;d have to read books&amp;#8230; but I try to do that at night now; it&amp;#8217;s a nice way to wind down from the day.&lt;br/&gt;&lt;br/&gt;That&amp;#8217;s it for now, expect more news as I learn good routes, which I&amp;#8217;ll post via &lt;a href="http://www.mapmyride.com/"&gt;mapmyride.com&lt;/a&gt;, and find useful or just cool gear.&lt;br/&gt;&lt;br/&gt;my bike, a fuji crosstown 3.0 hybrid:&lt;br/&gt;&lt;img src="http://farm4.static.flickr.com/3202/2385408524_cc16460c3b.jpg?v=0"/&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/bike">bike</category>
    </item>
    <item>
      <title>Single table inheritance strangeness</title>
      <link>http://brighter.net/past/2008/4/29/sti_weirdness/</link>
      <pubDate>Tue, 29 Apr 2008 17:19:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/4/29/sti_weirdness/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;I suppose &amp;#8220;special&amp;#8221; is a word for this behavior. I would have expected a constraint used in find_by_id to also be used in find. Right.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&gt;&gt; Asset.find_by_id(params[:id])&lt;br/&gt;# =&gt; nil&lt;br/&gt;&lt;br/&gt;log: Asset Load (0.009816)   SELECT * FROM assets WHERE (assets.`id` = &amp;#8216;8515&amp;#8217;) AND ( (assets.`class_name` = &amp;#8216;Asset&amp;#8217; ) ) LIMIT 1&lt;br/&gt;&lt;br/&gt;&gt;&gt; Asset.find(params[:id])&lt;br/&gt;# =&gt; #&lt;IdamAsset:0x31b8660 @attributes={"class_name"=&gt;&amp;#8220;IdamAsset&amp;#8221;, &amp;#8220;updated_date&amp;#8221;=&gt;&amp;#8221;2008-04-14 20:49:58&amp;#8221;, &amp;#8220;restrictions&amp;#8221;=&gt;nil, &amp;#8220;idam_iud&amp;#8221;=&gt;&amp;#8221;19013896&amp;#8221;, &amp;#8220;name&amp;#8221;=&gt;&amp;#8221;6da9.jpg&amp;#8221;, &amp;#8220;hide&amp;#8221;=&gt;&amp;#8221;0&amp;#8221;, &amp;#8220;is_pending&amp;#8221;=&gt;&amp;#8221;0&amp;#8221;, &amp;#8220;is_administrative&amp;#8221;=&gt;&amp;#8221;0&amp;#8221;, &amp;#8220;created_date&amp;#8221;=&gt;&amp;#8221;2008-04-14 20:49:58&amp;#8221;, &amp;#8220;security_level&amp;#8221;=&gt;&amp;#8221;1&amp;#8221;, &amp;#8220;media_type_id&amp;#8221;=&gt;&amp;#8221;10&amp;#8221;, &amp;#8220;id&amp;#8221;=&gt;&amp;#8221;8515&amp;#8221;, &amp;#8220;description&amp;#8221;=&gt;&amp;#8221;&amp;#8220;, &amp;#8220;filename&amp;#8221;=&gt;&amp;#8221;6da9.jpg&amp;#8221;, &amp;#8220;last_synced_at&amp;#8221;=&gt;nil, &amp;#8220;uploaded_by_id&amp;#8221;=&gt;&amp;#8221;448&amp;#8221;}&gt;&lt;br/&gt;&lt;br/&gt;log: BaseAsset Load (0.000528)   SELECT * FROM assets WHERE (assets.`id` = 8515)&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/rails">rails</category>
      <category domain="http://brighter.net/past/tags/sti">sti</category>
    </item>
    <item>
      <title>print out a controller's expected actions</title>
      <link>http://brighter.net/past/2008/4/26/meta_routes_actions/</link>
      <pubDate>Sat, 26 Apr 2008 11:59:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/4/26/meta_routes_actions/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;Ever want to see a list of actions defined on your controller and what methods over http they expect?&lt;br/&gt;&lt;br/&gt;try this in your console, where &amp;#8220;users&amp;#8221; is your controller&amp;#8217;s name:&lt;br/&gt;&lt;br/&gt;&lt;pre class="brilliance_dull"&gt;&lt;span class="line-numbers"&gt;   1 &lt;/span&gt; &lt;span class="LibraryClassType"&gt;ActionController&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;::&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;Routing&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;::&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;Routes&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;routes&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;select&lt;/span&gt;&lt;/span&gt; &lt;span class="KeywordControl"&gt;do &lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt;&lt;span class="Variable"&gt;route&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   2 &lt;/span&gt;   route&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;defaults&lt;/span&gt;&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;[&lt;/span&gt;&lt;span class="UserDefinedConstant"&gt;&lt;span class="VariablePunctuation"&gt;:&lt;/span&gt;controller&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;]&lt;/span&gt; &lt;span class="KeywordOperatorComparison"&gt;==&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;users&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   3 &lt;/span&gt; &lt;span class="KeywordControl"&gt;end&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;uniq&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;each&lt;/span&gt;&lt;/span&gt; &lt;span class="KeywordControl"&gt;do &lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt;&lt;span class="Variable"&gt;route&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt; &lt;br/&gt;&lt;span class="line-numbers"&gt;   4 &lt;/span&gt;   puts &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;span class="SourceStringSource"&gt;&lt;span class="StringEmbeddedSource"&gt;#{&lt;/span&gt;route&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;defaults&lt;/span&gt;&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;[&lt;/span&gt;&lt;span class="UserDefinedConstant"&gt;&lt;span class="VariablePunctuation"&gt;:&lt;/span&gt;action&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;]&lt;/span&gt;&lt;span class="StringEmbeddedSource"&gt;}&lt;/span&gt;&lt;/span&gt; expects http method: &lt;span class="SourceStringSource"&gt;&lt;span class="StringEmbeddedSource"&gt;#{&lt;/span&gt;route&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;conditions&lt;/span&gt;&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;[&lt;/span&gt;&lt;span class="UserDefinedConstant"&gt;&lt;span class="VariablePunctuation"&gt;:&lt;/span&gt;method&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;]&lt;/span&gt;&lt;span class="StringEmbeddedSource"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   5 &lt;/span&gt; &lt;span class="KeywordControl"&gt;end&lt;/span&gt;&lt;span class="MiscPunctuation"&gt;;&lt;/span&gt;&lt;span class="BuiltInConstant"&gt;nil&lt;/span&gt;&lt;br/&gt;&lt;/pre&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/meta">meta</category>
      <category domain="http://brighter.net/past/tags/ruby">ruby</category>
    </item>
    <item>
      <title>model_stubbing in Rails 1.2.x</title>
      <link>http://brighter.net/past/2008/4/18/model_stubbing_rails_1_2/</link>
      <pubDate>Fri, 18 Apr 2008 10:58:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/4/18/model_stubbing_rails_1_2/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;I really like &lt;a href="http://weblog.techno-weenie.net/"&gt;technoweenie&lt;/a&gt;&amp;#8217;s plugin &lt;a href="http://github.com/technoweenie/model_stubbing/tree/master"&gt;model_stubbing&lt;/a&gt;. It&amp;#8217;s a nice alternative to fixtures, and an even nicer way to create stubs in your tests and specs. &lt;br/&gt;&lt;br/&gt;Unfortunately the &lt;a href="http://www.streeteasy.com"&gt;StreetEasy&lt;/a&gt; codebase is still on Rails 1.2.x which caused compatibility problems with the plugin. Rails 2 refactored Fixtures and database statements a bit. &lt;br/&gt;&lt;br/&gt;I had to modify the plugin to get it to work with older versions of Rails. I forked the project on github and post about it to help anyone who&amp;#8217;d like to use the plugin but is not upgraded to Rails 2 yet.&lt;br/&gt;&lt;br/&gt;github homepage: &lt;a href="http://github.com/jacqui/model_stubbing/tree/master"&gt;forked model_stubbing&lt;/a&gt;&lt;br/&gt;public clone url: git@github.com:jacqui/model_stubbing.git&lt;br/&gt;&lt;br/&gt;[edit] btw, simplelog was munging the href for the public clone url; it seems to like prepending http:// to links, so i just removed the anchor tags from it.&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/git">git</category>
      <category domain="http://brighter.net/past/tags/mocks">mocks</category>
      <category domain="http://brighter.net/past/tags/rspec">rspec</category>
      <category domain="http://brighter.net/past/tags/testing">testing</category>
    </item>
    <item>
      <title>make localhost</title>
      <link>http://brighter.net/past/2008/4/15/make_localhost/</link>
      <pubDate>Tue, 15 Apr 2008 07:58:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/4/15/make_localhost/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;Hey Rails developers: I bet you do the majority of your development locally, but work in an environment where you have various other development, staging, testing, and production servers. &lt;br/&gt;&lt;br/&gt;I often have to check the same URL locally and on our staging or production servers. I got tired of selecting the hostname and changing it to &amp;#8220;localhost:3000&amp;#8221; and vice versa, so I made myself a bookmarklet. It is *really* easy to make a bookmarklet.&lt;br/&gt;&lt;br/&gt;Here&amp;#8217;s a bookmarklet that will replace everything up to the gTLD (I took this list from &lt;a href="http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains"&gt;wikipedia&lt;/a&gt;) with &amp;#8220;localhost:3000&amp;#8221;. Drag it to your bookmarks toolbar, and the next time you&amp;#8217;re on a url in your application that you&amp;#8217;d like to view locally, just click it.&lt;br/&gt;&lt;br/&gt;&lt;a href="javascript:var current_url = location.href; var new_url = current_url.replace(/.*?(\.com|\.net|\.org|\.mil|\.info|\.gov|\.biz|\.jobs|\.int|\.pro|\.ae    ro|\.asia|\.cat|\.coop|\.edu|\.mobi|\.museum|\.name|\.travel|\.tel)\//, 'http://localhost:3000/'); location.href = new_url; "&gt;make localhost&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;here&amp;#8217;s the source. enjoy&amp;#8230;&lt;br/&gt;&lt;br/&gt;&lt;pre class="brilliance_dull"&gt;&lt;span class="line-numbers"&gt;   1 &lt;/span&gt; &lt;span class="KeywordOperatorComparison"&gt;&amp;lt;&lt;/span&gt;a href&lt;span class="KeywordOperatorAssignment"&gt;=&lt;/span&gt;&lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;javascript:var current_url = location.href; var new_url = current_url.replace(/.*?(&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;com|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;net|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;org|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;mil|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;info|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;gov|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;biz|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;jobs|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;int|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;pro|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;ae    ro|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;asia|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;cat|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;coop|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;edu|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;mobi|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;museum|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;name|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;travel|&lt;span class="CharacterConstant"&gt;\.&lt;/span&gt;tel)&lt;span class="CharacterConstant"&gt;\/&lt;/span&gt;/, 'http://localhost:3000/'); location.href = new_url; &lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="KeywordOperatorComparison"&gt;&amp;gt;&lt;/span&gt;make localhost&lt;span class="KeywordOperatorComparison"&gt;&amp;lt;&lt;/span&gt;&lt;span class="KeywordOperatorArithmetic"&gt;/&lt;/span&gt;a&lt;span class="KeywordOperatorComparison"&gt;&amp;gt;&lt;/span&gt;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;I viewed that in my browser and dragged the link to my bookmarks toolbar. Now I can be on any of our servers ending in &amp;#8220;.streeteasy.com&amp;#8221; and in a single click view the page locally.&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/bookmarklets">bookmarklets</category>
      <category domain="http://brighter.net/past/tags/firefox">firefox</category>
      <category domain="http://brighter.net/past/tags/javascript">javascript</category>
    </item>
    <item>
      <title>select!</title>
      <link>http://brighter.net/past/2008/4/11/select_bang/</link>
      <pubDate>Fri, 11 Apr 2008 08:55:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/4/11/select_bang/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;I found myself having to reverse logic in some code I wrote recently due to the wants of the client doing a 180. I had been using reject! to remove elements in an array, and realized that I now wanted to use select! - only there is no select!&lt;br/&gt;&lt;br/&gt;I started to write:&lt;br/&gt;&lt;br/&gt;arr = arr.select{|a| some.method.here }&lt;br/&gt;&lt;br/&gt;when it occured to me that was a little clunky. I wanted select in place.&lt;br/&gt;&lt;br/&gt;Here&amp;#8217;s my version of it:&lt;br/&gt;&lt;br/&gt;&lt;pre class="brilliance_dull"&gt;&lt;span class="line-numbers"&gt;   1 &lt;/span&gt; &lt;span class="Class"&gt;&lt;span class="KeywordControl"&gt;class&lt;/span&gt; &lt;span class="ClassName"&gt;Array&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   2 &lt;/span&gt;   &lt;span class="FunctionDeclaration"&gt;&lt;span class="KeywordControl"&gt;def&lt;/span&gt; &lt;span class="FunctionDeclarationName"&gt;select!&lt;/span&gt;&lt;span class="FunctionDeclarationParametersPunctuation"&gt;(&lt;/span&gt;&lt;span class="FunctionDeclarationParameters1"&gt;&lt;span class="KeywordOperatorArithmetic"&gt;&amp;amp;&lt;/span&gt;block&lt;/span&gt;&lt;span class="FunctionDeclarationParametersPunctuation"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   3 &lt;/span&gt;     selected &lt;span class="KeywordOperatorAssignment"&gt;=&lt;/span&gt; &lt;span class="Variable"&gt;self&lt;/span&gt;&lt;span class="FunctionDeclaration"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCall"&gt;select&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallArgumentsPunctuation"&gt;(&lt;/span&gt;&lt;span class="KeywordOperatorArithmetic"&gt;&amp;amp;&lt;/span&gt;block&lt;span class="FunctionCallArgumentsPunctuation"&gt;)&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   4 &lt;/span&gt;     &lt;span class="KeywordControl"&gt;if&lt;/span&gt; selected&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;size&lt;/span&gt;&lt;/span&gt; &lt;span class="KeywordOperatorComparison"&gt;&amp;gt;&lt;/span&gt; &lt;span class="Number"&gt;0&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   5 &lt;/span&gt;       &lt;span class="FunctionDeclaration"&gt;&lt;span class="FunctionCall"&gt;replace&lt;/span&gt;&lt;/span&gt;&lt;span class="FunctionCallArgumentsPunctuation"&gt;(&lt;/span&gt;selected&lt;span class="FunctionCallArgumentsPunctuation"&gt;)&lt;/span&gt; &lt;br/&gt;&lt;span class="line-numbers"&gt;   6 &lt;/span&gt;     &lt;span class="KeywordControl"&gt;else&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   7 &lt;/span&gt;       &lt;span class="BuiltInConstant"&gt;nil&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   8 &lt;/span&gt;     &lt;span class="KeywordControl"&gt;end&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   9 &lt;/span&gt;   &lt;span class="KeywordControl"&gt;end&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;  10 &lt;/span&gt; &lt;span class="KeywordControl"&gt;end&lt;/span&gt;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;Usage:&lt;br/&gt;&lt;br/&gt;&lt;pre class="brilliance_dull"&gt;&lt;span class="line-numbers"&gt;   1 &lt;/span&gt; &lt;span class="KeywordOperator"&gt;&amp;gt;&amp;gt;&lt;/span&gt; arr &lt;span class="KeywordOperatorAssignment"&gt;=&lt;/span&gt; &lt;span class="ArrayPunctuation"&gt;[&lt;/span&gt;&lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;Ren&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="MiscPunctuation"&gt;,&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;Easy-E&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="MiscPunctuation"&gt;,&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;Ice Cube&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="MiscPunctuation"&gt;,&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;DJ Yella&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="MiscPunctuation"&gt;,&lt;/span&gt; &lt;span class="String"&gt;&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;Dr Dre&lt;span class="StringPunctuation"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class="ArrayPunctuation"&gt;]&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   2 &lt;/span&gt; &lt;span class="Comment"&gt;&lt;span class="VariablePunctuation"&gt;#&lt;/span&gt; =&amp;gt; [&amp;quot;Ren&amp;quot;, &amp;quot;Easy-E&amp;quot;, &amp;quot;Ice Cube&amp;quot;, &amp;quot;DJ Yella&amp;quot;, &amp;quot;Dr Dre&amp;quot;]  &lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   3 &lt;/span&gt; &lt;br/&gt;&lt;span class="line-numbers"&gt;   4 &lt;/span&gt; &lt;span class="KeywordOperator"&gt;&amp;gt;&amp;gt;&lt;/span&gt; arr&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;select!&lt;/span&gt;&lt;/span&gt;&lt;span class="Source"&gt;{&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt;&lt;span class="Variable"&gt;a&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt; a &lt;span class="KeywordOperatorComparison"&gt;=~&lt;/span&gt; &lt;span class="StringRegex"&gt;&lt;span class="StringPunctuationIi"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span class="StringRegex"&gt;^D&lt;/span&gt;&lt;span class="StringRegex"&gt;&lt;span class="StringPunctuationIi"&gt;/&lt;/span&gt;&lt;/span&gt; &lt;span class="Source"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   5 &lt;/span&gt; &lt;span class="Comment"&gt;&lt;span class="VariablePunctuation"&gt;#&lt;/span&gt; =&amp;gt; [&amp;quot;DJ Yella&amp;quot;, &amp;quot;Dr Dre&amp;quot;]  &lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   6 &lt;/span&gt; &lt;br/&gt;&lt;span class="line-numbers"&gt;   7 &lt;/span&gt; &lt;span class="KeywordOperator"&gt;&amp;gt;&amp;gt;&lt;/span&gt; arr&lt;span class="FunctionCallWithoutArguments"&gt;&lt;span class="MetaDelimiter"&gt;.&lt;/span&gt;&lt;span class="FunctionCallWithoutArguments"&gt;select!&lt;/span&gt;&lt;/span&gt;&lt;span class="Source"&gt;{&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt;&lt;span class="Variable"&gt;a&lt;/span&gt;&lt;span class="Variable"&gt;|&lt;/span&gt; a &lt;span class="KeywordOperatorComparison"&gt;=~&lt;/span&gt; &lt;span class="StringRegex"&gt;&lt;span class="StringPunctuationIi"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;span class="StringRegex"&gt;^J&lt;/span&gt;&lt;span class="StringRegex"&gt;&lt;span class="StringPunctuationIi"&gt;/&lt;/span&gt;&lt;/span&gt; &lt;span class="Source"&gt;}&lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   8 &lt;/span&gt; &lt;span class="Comment"&gt;&lt;span class="VariablePunctuation"&gt;#&lt;/span&gt; =&amp;gt; nil  &lt;/span&gt;&lt;br/&gt;&lt;span class="line-numbers"&gt;   9 &lt;/span&gt; &lt;br/&gt;&lt;span class="line-numbers"&gt;  10 &lt;/span&gt; &lt;span class="KeywordOperator"&gt;&amp;gt;&amp;gt;&lt;/span&gt; arr&lt;br/&gt;&lt;span class="line-numbers"&gt;  11 &lt;/span&gt; &lt;span class="Comment"&gt;&lt;span class="VariablePunctuation"&gt;#&lt;/span&gt; =&amp;gt; [&amp;quot;DJ Yella&amp;quot;, &amp;quot;Dr Dre&amp;quot;]&lt;/span&gt;&lt;br/&gt;&lt;/pre&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/array">array</category>
      <category domain="http://brighter.net/past/tags/ruby">ruby</category>
      <category domain="http://brighter.net/past/tags/snippets">snippets</category>
    </item>
    <item>
      <title>fixing a bad commit with git-svn</title>
      <link>http://brighter.net/past/2008/3/25/fixing_bad_git_commits/</link>
      <pubDate>Tue, 25 Mar 2008 12:28:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/3/25/fixing_bad_git_commits/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;I do this fairly often, mostly because I haven&amp;#8217;t migrated all of our svn pre-commit hooks to git. I really ought to do that..&lt;br/&gt;&lt;br/&gt;$ git tag bad 012345 # or any other valid git reference&lt;br/&gt;$ git checkout bad&lt;br/&gt;$ # make changes here and update the index&lt;br/&gt;$ git add &lt;file&gt;&lt;br/&gt;$ git commit &amp;#8211;amend&lt;br/&gt;$ git rebase &amp;#8211;onto HEAD bad master   # where &amp;#8216;master&amp;#8217; is the branch in question&lt;br/&gt;$ git tag -d bad&lt;br/&gt;&lt;br/&gt;thanks to &lt;a href="http://notso.net"&gt;sebastian delmont&lt;/a&gt; for this.&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/git">git</category>
      <category domain="http://brighter.net/past/tags/svn">svn</category>
    </item>
    <item>
      <title>speedy browsing</title>
      <link>http://brighter.net/past/2008/3/20/ive_been_using_the_firefox/</link>
      <pubDate>Thu, 20 Mar 2008 14:45:00 GMT</pubDate>
      <guid>http://brighter.net/past/2008/3/20/ive_been_using_the_firefox/</guid>
      <author>jacqui@brighter.net (jacqui maher)</author>
      <description>&lt;p&gt;I&amp;#8217;ve been using the Firefox 3 beta for about a week now and I&amp;#8217;m really happy with it so far. It&amp;#8217;s a lot faster and less of a memory hog in OSX than its predecessor. The one thing I was wishing for was the beautiful, extremely useful, firebug extension&amp;#8230; I kept opening Firefox 2 whenever I needed to do UI work.&lt;br/&gt;&lt;br/&gt;Then I realized I hadn&amp;#8217;t even checked if Firebug was compatible with Firefox 3, aside from the initial plugin compatibility check that Firefox does on its first run. &lt;br/&gt;&lt;br/&gt;Lo and behold: the latest firebug beta works with Firefox 3 beta release 4! YES!&lt;br/&gt;&lt;br/&gt;so what are you waiting for? install it now:&lt;br/&gt;&lt;a href="http://fireclipse.xucia.com/files/fireclipse/firebug-1.1.0b10.xpi"&gt;firebug beta xpi&lt;/a&gt;&lt;/p&gt;</description>
      <category domain="http://brighter.net/past/tags/firebug">firebug</category>
      <category domain="http://brighter.net/past/tags/firefox">firefox</category>
      <category domain="http://brighter.net/past/tags/javascript">javascript</category>
    </item>
  </channel>
</rss>
