Skip to content

Instantly share code, notes, and snippets.

View kent's full-sized avatar
👋

Kent Fenwick kent

👋
View GitHub Profile
Hello,
Thank you very much for agreeing to participate in the Friend Forecaster Pilot Study. We are eager to get you started and hear your feedback.
Friend Forecaster is a web application that is designed to help you remember names. It would be great if that was the end of the story but in order to get the most out of Friend Forecaster you are going to have to do a little bit of work.
Friend Forecaster is powered by the people you know or want to know, the places you go, the activities you do and the groups that you are apart of. The idea is that by knowing about these things and relating them with tags / labels the system will be able to give you suggested lists of people you might see.
That is really all that we want to tell you at the moment since you are a pilot participant and we want to see how you use the system on your own during the study.
@kent
kent / jQuery Colourizer.js
Created May 28, 2009 14:45
Add a splash of random colour to elements of your page
// jQuery Colourizer
// Kent Fenwick 2009
// Use it when you want to add a splash of random colour to your page
// Create the colour array
var color_array = ["#ce521d","#ca4b89","#006b89","#3e2d7e","#61902c", "#faa31a", "#6e002a", "#4981b3",
"#980069", "#2dacbf", "#ee1d25", "#9cb46f", "#9a869e", "#ee008c", "#00a895",
"#7b181a", "#ffd63c", "#b46638", "#bcd634", "#f4ea00", "#32b6c0", "#e8ac1c",
"#ea2d50", "#3c7022", "#0085cc", "#97C83B"];
// Pick a random colour of the array
def layout_link_to(link_text, path)
curl = url_for(:controller => request.path_parameters['controller'],
:action => request.path_parameters['action'])
html = ''
options = path == curl ? {:class => 'current'} : {}
html << content_tag("li", link_to(link_text, path, options))
end
@kent
kent / Kent's Rails Way Tab Helper.rb
Created May 20, 2009 03:17
Rails Tabbed Navigation Helper
def layout_link_to(link_text, path, opts = {})
curl = url_for(:controller => request.path_parameters['controller'],
:action => request.path_parameters['action'])
html = ''
options = curl.include?(path) ? {:class => 'current'} : {}
if opts[:class] && options[:class]
options[:class] = "current #{opts[:class]}"
else
options.merge!(opts)
end