Skip to content

Instantly share code, notes, and snippets.

View renaehodgkins's full-sized avatar

Renae Hodgkins renaehodgkins

View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
echo '○'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
@renaehodgkins
renaehodgkins / activeadmin_controller_test_example
Last active August 29, 2015 13:57
testing activeadmin controller example
require 'spec_helper'
describe Admin::ArtifactsController, type: feature do
render_views
before(:each) do
@user = create(:user)
@admin_user = AdminUser.create(email: "test123@test.com", password: "123SuperTest")
@artifact = create(:artifact)
end
Date: Tue, 22 Oct 2013 10:16:04 -0400
From: "renaebair@gmail.com" <renaebair@gmail.com>
To: appointments@fabozzidental.com
Message-ID: <526688a4c3a4c_d2ea3fe81a035ad87817e@pixelcandy.local.mail>
In-reply-to: 69408403-4158-493F-A1E6-A0564B091DE0@gmail.com
References:
Subject: test with attachment
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="--==_mimepart_526688a4b3b3e_d2ea3fe81a035ad8780ab";
pixelcandy at pixelcandy in ~/Downloads
$ tar -xzvf 2013-09-05.tar.gz
x 2013-09-05/
x 2013-09-05/._.DS_Store
x 2013-09-05/.DS_Store
x 2013-09-05/mailtank/
x 2013-09-05/monster4.speedymac.com.pid
x 2013-09-05/mysql/
x 2013-09-05/mysql-bin.000001
x 2013-09-05/mysql-bin.000002
pixelcandy at Renaes-MacBook-Pro in ~/workspace/12spokes/assessment (assessment-type-required●)
$ rspec spec
You are using Typhoeus 0.2.4. WebMock supports version >= 0.3.2.
Content Service Configured http://content.dev
........FFFFFFF...........................................................................................................................................................................................................................F.....FFFF........F....FFF..............................................................................................................QFont::setPixelSize: Pixel size <= 0 (0)
..*...*..............................................................................
Pending:
AdminSessions as an assessor with upcoming sessions
# Temporarily disabled with xit
pixelcandy at Renaes-MacBook-Pro in ~/workspace/12spokes/assessment (master●●)
$ rspec spec
You are using Typhoeus 0.2.4. WebMock supports version >= 0.3.2.
Content Service Configured http://content.dev
........FFFFFFF...........................................................................................................................................................................................................................F.....FFFF........F....FFF..............................................................................................................QFont::setPixelSize: Pixel size <= 0 (0)
..*...*..............................................................................
Pending:
AdminSessions as an assessor with upcoming sessions
# Temporarily disabled with xit
pixelcandy at Renaes-MacBook-Pro in ~/workspace/12spokes/assessment (master●●)
$ rake reverse_score
Content Service Configured http://content.stub.me
1 - ZOMG start: current 5, original_value 10
2 - ZOMG start: current 4, original_value 9
3 - ZOMG start: current 4, original_value 9
4 - ZOMG start: current 3, original_value 8
5 - ZOMG start: current 4, original_value 9
6 - ZOMG start: current 4, original_value 9
7 - ZOMG start: current 2, original_value 7
desc "Reverses current score for heart and start"
task :reverse_score => :environment do
Observation.where(:current_score && !:option_value).compact.each do |observation|
next unless observation.assessment
if observation.assessment.heart?
observation.option_value = observation.current_score.abs + 1
else
observation.option_value = observation.current_score.abs + 5
end
end
task :reverse_score => :environment do
Observation.where(:current_score && !:option_value).each do |treatment|
puts("ZOMG heart: #{:current_score} and stuff #{:current_score + 1}") if assessment.heart?
puts("ZOMG start: #{:current_score} and stuff #{:current_score + 5}") if assessment.start?
# self.option_value = observation.current_score + 1 if assessment.heart?
# self.option_value = observation.current_score + 5 if assessment.start?
# end
end
end