Supermicro X7SPE-H D525 and Antec ISK300-150

This motherboard does NOT fit in this case. After rereading the specs, the motherboard is in the Flex ATX size and the case is mini ITX. While I thought I read that these were compatible, I can now state emphatically that they are not. So, my decision now is whether to return the case or modify it. If I knew I could find another case that fit the motherboard, I’d do that. But I’m not clear that I’ll be able to find a flex ATX case. In which case, I’m going to have to modify something anyway, so why not this cheapo case that I have.

I’ll do a bit more research before I decide.

I decided to just modify the case to fit the new board. This just required me to cut off a the bit of the case where the motherboard would hit it. Using a dremel tool and a saw (I really just needed the saw), I cut two lines in the base and then just bent the part that was in the way down. I also cut a little section off the back edge as well. Then, I glued part of an old bicycle inner tube around the cut parts, just in case any would come in contact with the motherboard. After hooking everything up, the system came up fine. I have one problem with the lights on the case, in that they’re not coming on, but I’ll work on that tomorrow. I also probably won’t be able to put the cover back on without modifying it. I’m not too concerned about this, so I doubt I ever fix it. I have some pictures, which I’ll post as soon as I get the cable for my camera back.

Rails3 and Standard Library CSV

Recently I had learned how to write a csv file in my rails app using the fasterCSV gem. In Rails3, CSV is now part of the standard library, so things are a little different. I also did a few trickier things this time around, so I’m updating my notes.

In Gemfile, add:

require 'csv'

As before, create config/download_csv.yml

    all: /Users/me/Desktop/all.csv
    current: /Users/me/Desktop/current.csv
    previous: /Users/me/Desktop/previous.csv
    all: /tmp/all.csv
    current: /tmp/current.csv
    previous: /tmp/previous.csv

In the model, add a method to make the csv file.

  def self.download_charges(project_id, timeframe)
    csv_settings = YAML.load_file("#{Rails.root.to_s}/config/
    filename = csv_settings[timeframe]
    if (timeframe == 'current')
      @entries = Entry.billable.current_month.where(:project_id => 
    if (timeframe == 'previous')
      @entries = Entry.billable.previous_month.where(:project_id => 
    if (timeframe == 'all')
      @entries = Entry.billable.where(:project_id => 
    end"#{filename}",'w') do |csv|
      csv << ["Report Generated On #{}"]
      csv << ["Account",
      csv << ["#{}"]
      csv << ["Total Charges", "#{@entries.sum(:cost)}"]
      csv << [""]
      csv << ['Date','Staff Member', 'Hours', 'Charge', 'Note']
      @entries.each do |entry|
        csv << ["#{entry.start_date.to_s(:fulldate)}",
"#{entry.cost}", "#{entry.note}"]

In the controller, make a method to call.

  def download_charges
    csv_settings = YAML.load_file("#{Rails.root.to_s}/config/
    filename = csv_settings["#{params[:timeframe]}"]
    send_file "#{filename}", :type => 'text/csv'

and add it to the filter_resource access line.

  filter_resource_access :additional_collection => 
[[:download_charges, :index], :index]

To my routes file, add:

  resources :entries do
    collection do
      get 'download_charges', :as => :download_charges

Lastly, in my view, add the required links. Here they're a little trickier because I want the same method to work for different time frames.

	<% unless params[:project_id].nil? %>
			<%= link_to 'Download All Charges', :controller => :entries, 
:action => :download_charges, :project_id => @entries.first.project_id, 
timeframe => 'all' %>
			<%= link_to 'Download Current Month Charges', 
:controller => :entries, :action => :download_charges,
 :project_id => @entries.first.project_id, 
:timeframe => 'current'%>
			<%= link_to 'Download Previous Month Charges',
 :controller => :entries, :action => :download_charges, 
:project_id => @entries.first.project_id, :timeframe => 
	<% end %>