<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><description></description><title>brighter</title><generator>Tumblr (3.0; @brighter)</generator><link>http://brighter.tumblr.com/</link><item><title>.bashrc vs .bash_profile vs .profile</title><description>&lt;p&gt;Despite &lt;b&gt;years&lt;/b&gt; of various Unix flavor development, I can never remember the difference between the above mentioned files. So, I thought I’d finally document the outcome of my experiment here for posterity:&lt;/p&gt;
&lt;p&gt;bash_profile: interactive login shells&lt;/p&gt;
&lt;p&gt;bashrc: non-interactive login shells&lt;/p&gt;
&lt;p&gt;profile: I’m guessing this is used when you do not have a bash_profile file. I found it hard to find a definitive answer, though.&lt;/p&gt;
&lt;p&gt;$ cat .bashrc&lt;br/&gt;export BASHRC=’loaded’&lt;br/&gt;$ cat .bash_profile&lt;br/&gt;export BASH_PROFILE=’loaded’&lt;br/&gt;$ cat .profile&lt;br/&gt;export PROFILE=’loaded’&lt;br/&gt;$ echo $BASHRC&lt;/p&gt;
&lt;p&gt;$ echo $BASH_PROFILE&lt;br/&gt;loaded&lt;br/&gt;$ echo $PROFILE&lt;/p&gt;

&lt;p&gt;Removing my .bash_profile file gives the following results:&lt;/p&gt;
&lt;p&gt;$ echo $BASHRC&lt;br/&gt;&lt;br/&gt;$ echo $BASH_PROFILE&lt;br/&gt;&lt;br/&gt;$ echo $PROFILE&lt;br/&gt; loaded&lt;/p&gt;
&lt;p&gt;So, it looks like the .profile is loaded when no .bash_profile exists, but that the .bash_profile supercedes .profile when it is found, preventing it from being loaded.&lt;/p&gt;
&lt;p&gt;At least in Snow Leopard :)&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/235066785</link><guid>http://brighter.tumblr.com/post/235066785</guid><pubDate>Fri, 06 Nov 2009 08:29:58 -0800</pubDate></item><item><title>Rails - Delegate Attributes with Override Ability</title><description>&lt;p&gt;Ever find yourself in a situation where you wanted to delegate attributes from one model to an associated model &lt;b&gt;unless&lt;/b&gt; they were specified in the original model?&lt;/p&gt;
&lt;p&gt;I did, and I came up with a revamped version of Rails’ delegate method that not only checks if the original model has a value specified before delegating it to the associated model, but also checks that the associated model exists.&lt;/p&gt;
&lt;p&gt;Grab the gist here:  &lt;a href="http://gist.github.com/70186"&gt;&lt;a href="http://gist.github.com/70186"&gt;http://gist.github.com/70186&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Example usage is included in it.&lt;/p&gt;
&lt;p&gt;(originally posted on brighter.net)&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/211132146</link><guid>http://brighter.tumblr.com/post/211132146</guid><pubDate>Mon, 12 Oct 2009 09:16:00 -0700</pubDate></item><item><title>FakeWeb with Regular Expression support for registering URIs</title><description>&lt;p&gt;I have recently started using a gem called &lt;a href="http://fakeweb.rubyforge.org/"&gt;FakeWeb&lt;/a&gt; to fake http requests in my specs. It’s awesome - FakeWeb allowed me to ensure that I had stubbed out all external API requests (on a rather API-dependent application) with one line of code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;code&gt; # prevent specs from trying to hit external api's&lt;/code&gt;&lt;br/&gt;&lt;code&gt;require 'fakeweb' &lt;/code&gt;&lt;br/&gt;&lt;code&gt; FakeWeb.allow_net_connect = false &lt;/code&gt;&lt;br/&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, I ran into an issue with it on another project that needed to block all requests except those going to a specific service. The issue was that each request had a different query string, and soon our spec helper was full of lines like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt; FakeWeb.register_uri("http://www.external.service.com/api/some/script?crazy=true&amp;param=foo&amp;list=0&amp;whatever=3", :string =&gt; "foo")   FakeWeb.register_uri("http://www.external.service.com/api/some/script?crazy=true&amp;param=foo&amp;list=0&amp;whatever=4&amp;additional=etc", :string =&gt; "foo")   FakeWeb.register_uri("http://www.external.service.com/api/some/script?crazy=true&amp;param=foo&amp;list=0&amp;whatever=5&amp;additional=bar", :string =&gt; "foo")   FakeWeb.register_uri("http://www.external.service.com/api/some/script?crazy=true&amp;param=foo&amp;list=0&amp;whatever=6", :string =&gt; "foo") &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The query params differed depending on the request issued. Where we really got into trouble was with escaped URIs - these are harder for mere humans to read, and we missed differences in the longer ones quite a few times.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt; FakeWeb.register_uri("http://example.com/?a=%09%0D&amp;b=%09%0D&amp;ca=%09dog%4D&amp;d=%26%0D&amp;g=%09%0D&amp;b=%09%0D&amp;ca=%09dog%4D&amp;d=%26%0D")   FakeWeb.register_uri("http://example.com/?a=%09%0D&amp;b=%09%0D&amp;ca=%09dog%4D&amp;d=%26%0D&amp;g=%09%0D&amp;b=%09%0E&amp;ca=%09dog%4D&amp;d=%26%0D")   FakeWeb.register_uri("http://example.com/?bc=%09%0D&amp;b=%09%0D&amp;ca=%09dog%4D&amp;d=%26%0D&amp;g=%09%0D&amp;b=%09%0D&amp;ca=%09dog%4D&amp;d=%26%0D") &lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This prompted me to ask, “why not pass a regexp to FakeWeb’s register_uri method?” That way, we could pass something like /example.com\/?a=(.*)$/ for example and not have to worry about the query parameters changing… and thus have less clutter in our spec helper.&lt;/p&gt;
&lt;p&gt;FakeWeb didn’t support this (it allowed you to pass URI and String objects) but it wasn’t too hard to add it. You can check out my fork here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/jacqui/fakeweb/tree/master"&gt;FakeWeb with Regular Expression support for registering URIs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope that other people find this useful. Oh yeah - please let me know on &lt;a href="http://www.github.com/"&gt;github&lt;/a&gt; if you find a bug in the code, and of course, feel free to fork it too!&lt;/p&gt;


&lt;p&gt;(originally posted on brighter.net)&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/211128509</link><guid>http://brighter.tumblr.com/post/211128509</guid><pubDate>Mon, 12 Oct 2009 09:10:51 -0700</pubDate></item><item><title>who says romance has to be a box of chocolates?</title><description>Wilson Bilkovich: It is. I love that a scottish man kicked a terrorist in the balls so hard that he hurt his foot.&lt;br /&gt;&#13;
Wilson Bilkovich: A terrorist who was on fire at the time.&lt;br /&gt;&#13;
Jacqui Maher: yes&lt;br /&gt;&#13;
Jacqui Maher: that made me think of you&lt;br /&gt;&#13;
Wilson Bilkovich: That's pretty much the most romantic thing I have ever had anyone say to me</description><link>http://brighter.tumblr.com/post/188718147</link><guid>http://brighter.tumblr.com/post/188718147</guid><pubDate>Tue, 15 Sep 2009 12:19:48 -0700</pubDate></item><item><title>How to write a love song, Part I</title><description>&lt;p&gt;Out of sorrow entire worlds have been built&lt;br/&gt;Out of longing great wonders have been willed&lt;br/&gt;They’re only little tears, darling, let them spill&lt;br/&gt;And lay your head upon my shoulder&lt;br/&gt;Outside my window the world has gone to war&lt;br/&gt;Are you the one that I’ve been waiting for?&lt;br/&gt;&lt;br/&gt;O we will know, won’t we?&lt;br/&gt;The stars will explode in the sky&lt;br/&gt;O but they don’t, do they?&lt;br/&gt;Stars have their moment and then they die&lt;br/&gt;&lt;br/&gt;There’s a man who spoke wonders though I’ve never met him&lt;br/&gt;He said, “He who seeks finds and who knocks will be let in”&lt;br/&gt;I think of you in motion and just how close you are getting&lt;br/&gt;And how every little thing anticipates you&lt;br/&gt;All down my veins my heart-strings call&lt;br/&gt;Are you the one that I’ve been waiting for?&lt;/p&gt;

&lt;p&gt;— Nick Cave&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/187880411</link><guid>http://brighter.tumblr.com/post/187880411</guid><pubDate>Mon, 14 Sep 2009 12:17:39 -0700</pubDate></item><item><title>an awesome morning</title><description>&lt;p&gt;I was riding my bike to work this morning through brooklyn and stopped at a red light. About a dozen other cyclists ended up stopped at this corner with me, and I was thinking that I’ve definitely noticed an increase in the number of people commuting by bike over the past couple of years, and that’s fantastic.&lt;/p&gt;
&lt;p&gt;While I was waiting for the light to change, I noticed that the woman on the bicycle next to me was wearing the coolest, prettiest shoes. Shoes that I had actually been searching for and failing to find: burgundy/black mary janes with a short heel. After being stopped at another red light a few blocks away, I got up the nerve to ask her where she got them. She couldn’t remember the brand, but as the light turned green, she offered to pull over on the next block and take them off so she could tell me. &lt;/p&gt;
&lt;p&gt;Incredible!&lt;/p&gt;
&lt;p&gt;She did that - the shoes, btw, are made by Jose Saenz, a shoemaker in Spain - and told me about the store she bought them at in Portland. How freaking nice is this chick? I thanked her and, as she was about to pedal away, she pointed out that you just don’t get this kind of interaction when you’re driving in a car.&lt;/p&gt;
&lt;p&gt;Very true.&lt;/p&gt;
&lt;p&gt;The rest of my ride was peaceful and breezy. The plant and garden guys on 6th avenue were again cutting up large branches - if anyone knows what exactly they’re doing, please let me know. A taxi actually waved me on to continue riding straight through an intersection, putting his turn signal on, not turning into my bike - amazing! &lt;/p&gt;
&lt;p&gt;It’s mornings like this that I remember, or at least, consciously consider, how much I love my hometown. Thank you, New York :) It’s good to be back.&lt;/p&gt;
&lt;p&gt;And thank you, female cyclist with impeccable taste in footwear. I not only found the &lt;a href="http://www.amenityshoes.com/"&gt;shoe store you referred to in Portland, OR&lt;/a&gt;, but I also found the &lt;a href="http://www.jose-saenz.com/"&gt;shoes&lt;/a&gt;!&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/178793141</link><guid>http://brighter.tumblr.com/post/178793141</guid><pubDate>Thu, 03 Sep 2009 06:56:00 -0700</pubDate></item><item><title>I'm speaking at GoGaRuCo!</title><description>&lt;a href="http://brighter.net/past/2009/2/10/im_speaking_at_gogaruco/"&gt;I'm speaking at GoGaRuCo!&lt;/a&gt;</description><link>http://brighter.tumblr.com/post/77281291</link><guid>http://brighter.tumblr.com/post/77281291</guid><pubDate>Tue, 10 Feb 2009 14:16:52 -0800</pubDate></item><item><title>Testing Frameworks and Productivity</title><description>&lt;a href="http://brighter.net/past/2009/2/5/testing_frameworks_and_productivity/"&gt;Testing Frameworks and Productivity&lt;/a&gt;</description><link>http://brighter.tumblr.com/post/75895498</link><guid>http://brighter.tumblr.com/post/75895498</guid><pubDate>Thu, 05 Feb 2009 08:12:06 -0800</pubDate></item><item><title>Chipotle Employee Just Gave Guy In Front Of You More Rice | The Onion - America's Finest News Source</title><description>&lt;a href="http://www.theonion.com/content/news/chipotle_employee_just_gave_guy_in"&gt;Chipotle Employee Just Gave Guy In Front Of You More Rice | The Onion - America's Finest News Source&lt;/a&gt;</description><link>http://brighter.tumblr.com/post/73312640</link><guid>http://brighter.tumblr.com/post/73312640</guid><pubDate>Mon, 26 Jan 2009 13:11:22 -0800</pubDate></item><item><title>hello from the beach!</title><description>&lt;a href="http://brighter.net/past/2009/1/24/hello_from_the_beach/"&gt;hello from the beach!&lt;/a&gt;</description><link>http://brighter.tumblr.com/post/72874092</link><guid>http://brighter.tumblr.com/post/72874092</guid><pubDate>Sat, 24 Jan 2009 14:50:12 -0800</pubDate></item><item><title>I love the skull :)
via emmas.blogg.se</title><description>&lt;img src="http://9.media.tumblr.com/a8E9FYv8Gj2rm3ckWCNqC0Svo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;I love the skull :)&lt;/p&gt;
&lt;p&gt;via &lt;a href="http://emmas.blogg.se/images/2009/elle_deco_tableware001-0_26757007.jpg"&gt;emmas.blogg.se&lt;/a&gt;&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/72627770</link><guid>http://brighter.tumblr.com/post/72627770</guid><pubDate>Fri, 23 Jan 2009 11:02:56 -0800</pubDate></item><item><title>Savath &amp; Savalas</title><description>&lt;a href="http://www.prefuse73.com/savath.shtml"&gt;Savath &amp; Savalas&lt;/a&gt;: &lt;p&gt;music to check out, a prefuse 73 collaboration&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/72575229</link><guid>http://brighter.tumblr.com/post/72575229</guid><pubDate>Fri, 23 Jan 2009 06:45:20 -0800</pubDate></item><item><title>"The 1977 Blackout came during a troubled time in New York City. The City was under tremendous..."</title><description>“The 1977 Blackout came during a troubled time in New York City. The City was under tremendous financial stress, forcing government officials to cut back city services. These cutbacks fell most heavily on New York’s working poor communities, since many relied on public services to ease financial hardships in a time of deep economic recession. Increased crime, which had risen dramatically in the previous decade, also added to the crisis. The summer of 1977 was known as the “Summer of Sam,” named after David Berkowitz’s nationally publicized murder rampage which sent the City into a state of constant fear verging on panic. When the lights went out on July 13th, unleashing what Time magazine called a “night of terror,” New Yorkers wondered if their worst fears had finally come true. In a mixed metaphor that expressed his mixed feelings, one New Yorker asked, “if New York is the Big Apple, then why am living in the pits?””&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://blackout.gmu.edu/events/tl1977.html"&gt;events{1977 (New York Blackout) || Blackout History Project&lt;/a&gt;&lt;/em&gt;</description><link>http://brighter.tumblr.com/post/65746403</link><guid>http://brighter.tumblr.com/post/65746403</guid><pubDate>Fri, 19 Dec 2008 07:02:57 -0800</pubDate></item><item><title>via yeah-for-freddy.com</title><description>&lt;img src="http://21.media.tumblr.com/a8E9FYv8Gfh96kjsOv0UqL9fo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;via &lt;a href="http://yeah-for-freddy.com/wp-content/uploads/2007/05/caution_this_is_sparta.jpg"&gt;yeah-for-freddy.com&lt;/a&gt;&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/56232036</link><guid>http://brighter.tumblr.com/post/56232036</guid><pubDate>Fri, 24 Oct 2008 20:44:42 -0700</pubDate></item><item><title>Adventures in Africa</title><description>&lt;a href="http://brighter.net/past/2008/10/24/adventures_in_africa/"&gt;Adventures in Africa&lt;/a&gt;</description><link>http://brighter.tumblr.com/post/56214517</link><guid>http://brighter.tumblr.com/post/56214517</guid><pubDate>Fri, 24 Oct 2008 17:42:58 -0700</pubDate></item><item><title>"I bought a travel monopod and head that will fit in my backpack"</title><description>“I bought a travel monopod and head that will fit in my backpack”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;Wilson.&lt;/p&gt;

&lt;p&gt;I thought serial killers took, rather than bought, these things, but perhaps a “monopod” is a steampunk accessory that requires purchase.&lt;/p&gt;&lt;/em&gt;</description><link>http://brighter.tumblr.com/post/56150284</link><guid>http://brighter.tumblr.com/post/56150284</guid><pubDate>Fri, 24 Oct 2008 09:24:32 -0700</pubDate></item><item><title>status: eff you</title><description>*zack gives his computer the middle finger*&lt;br /&gt;&#13;
jacqui: you just flipped off your computer&lt;br /&gt;&#13;
zack: i was flipping off this website&lt;br /&gt;&#13;
jacqui: you just flipped off a WEBSITE!&lt;br /&gt;&#13;
...&lt;br /&gt;&#13;
jacqui: what status code is that?&lt;br /&gt;&#13;
zack: i don't know, i think they need to make one for it though</description><link>http://brighter.tumblr.com/post/56140820</link><guid>http://brighter.tumblr.com/post/56140820</guid><pubDate>Fri, 24 Oct 2008 08:23:00 -0700</pubDate></item><item><title>Council Votes, 29 to 22, to Extend Term Limits - City Room Blog - NYTimes.com</title><description>&lt;a href="http://cityroom.blogs.nytimes.com/2008/10/23/council-to-debate-term-limits-change/?hp"&gt;Council Votes, 29 to 22, to Extend Term Limits - City Room Blog - NYTimes.com&lt;/a&gt;: &lt;p&gt;I think this is messed up, personally. Wtf!&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/56022915</link><guid>http://brighter.tumblr.com/post/56022915</guid><pubDate>Thu, 23 Oct 2008 14:19:43 -0700</pubDate></item><item><title>via plancksconstant.org</title><description>&lt;img src="http://17.media.tumblr.com/a8E9FYv8Gffetzhv8zFO2aoTo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;via &lt;a href="http://plancksconstant.org/blog1/image3/sub5/realteam.jpg"&gt;plancksconstant.org&lt;/a&gt;&lt;/p&gt;</description><link>http://brighter.tumblr.com/post/56019030</link><guid>http://brighter.tumblr.com/post/56019030</guid><pubDate>Thu, 23 Oct 2008 13:47:20 -0700</pubDate></item><item><title>"The disappointment with our old “friends” is great and people ask, did we really behave any worse..."</title><description>“The disappointment with our old “friends” is great and people ask, did we really behave any worse than the others?”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;p&gt;&lt;a href="http://www.nytimes.com/2008/10/16/opinion/16kristmannsson.html?_r=1&amp;oref=slogin"&gt;Op-Ed Contributor - Iceland’s Bad Bet on the Global Economy - NYTimes.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;my response is, “Yes! Yes you did, Iceland.”&lt;/p&gt;
&lt;p&gt;See: &lt;a href="http://flickr.com/photos/harrisj/24073168/in/set-551101/"&gt;http://flickr.com/photos/harrisj/24073168/in/set-551101/&lt;/a&gt;&lt;/p&gt;&lt;/em&gt;</description><link>http://brighter.tumblr.com/post/56017058</link><guid>http://brighter.tumblr.com/post/56017058</guid><pubDate>Thu, 23 Oct 2008 13:33:00 -0700</pubDate></item></channel></rss>
