barinek.com: the official website

Below you'll find a quick stream of consciousness that includes photos, quotes, code snippets, and possibly even a full post. enjoy!

Gramir blues…

Gramir blues…

Talisker 25 through a Moser lens…

Talisker 25 through a Moser lens…

sneak peak, your local startup scene via CrunchBase - Median Raised Amount, selected states

sneak peak, your local startup scene via CrunchBase - Median Raised Amount, selected states

Pivotal Boulder 27-inch iMac paired with 27-inch Cinema Display

Pivotal Boulder 27-inch iMac paired with 27-inch Cinema Display

Pivotal Boulder Holiday party at Cafe Aion

Pivotal Boulder Holiday party at Cafe Aion

calculating median values via mysql

Here is a quick mysql sql snippet that I used to calculate median values grouped by year…

select a.year, avg(a.rownum), avg(a.value) from (
select if(@current_year=year, @rownum:=@rownum+1, @rownum:=1) as rownum, 
@current_year:=year as year, amount as value from (your_data_or_select) as amounts, (select 
@rownum:=0) as r, (select @current_year:=0) as y order by year, amount) as a,
(select year, 0.5+count(*)/2 as median from (your_data_or_select) as amounts group 
by year) as b
where a.rownum between (b.median - 0.5) and (b.median +0.5) and a.year = b.year 
group by a.year;
The interesting bit here is that you don’t need a stored proc and works well with activerecord and the mysql2 gem.
results = ActiveRecord::Base.connection.execute(sql)

another landmark…

another landmark…

chicago secret - Lou Malnati’s also has thin crust pizzas

chicago secret - Lou Malnati’s also has thin crust pizzas

Leslie amps

Leslie amps

[Flash 10 is required to watch video]

pivotal labs boulder - burgers in december…

Andy Irons - I surf because short film

Rails 3 with RVM and Cruise Control

Here are a few notes on how to get individual CruiseControl.rb project Builders running with RVM. [Note: I’m making an assumption here that you know and understand Bundler and RVM.] [Also: Cruise may or may not be running on RVM] Create and check in a .rvmrc file in your rails root directory. Here’s an example.

rvm ruby-1.8.7-p174@rails-example
Then, add a project build command to your cruise_config.rb file.
Project.configure do |project|
  project.build_command = './cruise_build.sh'
end
Finally, create a cruise_build.sh file. The bash script setups rvm and just calls your cruise control build task. [Note: Your cruise rake task should probably call Bundler’s “bundle install”.]
#!/bin/sh

source $HOME/.rvm/scripts/rvm && source .rvmrc

rake cc:build
…and your cruise project builder is now using RVM!

(Source: pivotallabs.com)

the whisky tour at pivotal labs…

@pivotalboulder thank you for helping out last week with #mountainrb, we have a great team…muchas gracias compadres twitter