Skip to content

Instantly share code, notes, and snippets.

Scott Ames-Messinger scottmessinger

Block or report user

Report or block scottmessinger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View jQuery fadeOut() isn't working.js
$('.editable').mouseenter(function(){
$(this).children('.nubbin_wrapper').fadeIn()
})
$('.editable').mouseleave(function(){
$(this).children('.nubbin_wrapper').fadeOut()
})
View livereload rubycocoa problems
teachfirst:mongocc ScottMessinger$ rvm info
ruby-1.8.7-p299@mongocc:
system:
uname: "Darwin teachfirst.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386"
shell: "bash"
version: "3.2.48(1)-release"
rvm:
version: "rvm 0.1.41 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"
View snippet.rb
def sort_roots
sequence_groups = []
#turn hash into array
params[:sequence_groups].each do |k, v|
sequence_groups << v
end
# First, assign the correct group_id
root_sequences = []
sequence_groups.each do |sg|
group_id = sg.keys[0].to_s.gsub('sequence_group_', '')
@scottmessinger
scottmessinger / Sort_roots.rb
Created Aug 18, 2010
From Courses controller
View Sort_roots.rb
def sort_roots
sequence_groups = []
#turn hash into array
params[:sequence_groups].each do |k, v|
sequence_groups << v
end
# First, assign the correct group_id
root_sequences = []
sequence_groups.each do |sg|
group_id = sg.keys[0].to_s.gsub('sequence_group_', '')
View hover.js
$('.editable').live('mouseover mouseout', function(event) {
if (event.type == 'mouseover') {
function() {
$(this).children('.nubbin_wrapper').show();
}
} else {
function() {
$(this).children('.nubbin_wrapper').hide();
}
}
View Sorting Sequences.rb
# from sequences_controller.rb
def sort
sequence_groups = []
#turn hash into array
if params[:sequence_groups]
params[:sequence_groups].each do |k, v|
sequence_groups << v
end
array = Sequence.assign_group_id(sequence_groups)
@scottmessinger
scottmessinger / match_window.rb
Created Oct 20, 2010
Shows the filename in the finder window
View match_window.rb
def match_text_for_idx idx
match = truncated_match @matches[idx]
if idx == @selection
prefix = @@selection_marker
suffix = padding_for_selected_match match
else
prefix = @@unselected_marker
suffix = ''
end
prefix + file_name(match) + match + suffix
View CoursePresenter.rb
module CoursePresenters
class ShowPresenter < Presenter
include AvailableResourceTypes
available_types #this is how I initialize availabe_resource_types...there has to be a better way
include CanCan::Ability
def initialize(course, current_user)
@current_user = current_user || User.new
@course = Course.find(course)
@scottmessinger
scottmessinger / standards.json
Created Jan 19, 2011
Scott's thoughts on an ideal schema
View standards.json
{
"uuid": "1a8c3540-ad56-53a4-92b4-cbb1e90f2e6f",
"ukey": "CC.E.K.RF.Print Concepts.1.a",
"_id": "1a8c3540-ad56-53a4-92b4-cbb1e90f2e6f",
"set": "Common Core State Standards Initiative",
"set_code": "CC",
"subject": "English/Language Arts",
"subject code": "E",
View home.html
<iframe name='please' style='display: none' src='https://spreadsheets.google.com/formResponse?formkey=asdasdf'></iframe>
<form target='please' action='https://spreadsheets.google.com/formResponse?formkey=asdasdf' class='contact_us' id='contact_us_form' method='POST' >
You can’t perform that action at this time.