Skip to content

Instantly share code, notes, and snippets.

View richardcalahan's full-sized avatar
🎯
Focusing

Richard Calahan richardcalahan

🎯
Focusing
View GitHub Profile
@richardcalahan
richardcalahan / example.js
Created April 5, 2012 22:08
Prevent iOS WebApp links from opening in Safari
$(document).ready(function() {
$('a').live('click', function (e) {
e.preventDefault();
window.location = $(this).attr('href');
});
});
@richardcalahan
richardcalahan / README
Created February 7, 2012 19:34
Calendar Generator class prototype
## NOTE
Class assumes event model includes start_date and end_date,
both of type 'datetime'.
You can init the class with a hash of options.
There are two options options at this point, 'month_format',
and 'date_format' which accept Ruby's 'strftime' style strings.
@richardcalahan
richardcalahan / sass.rb
Created September 28, 2011 20:16
Sass ActiveAdmin Permissions Error Fix
Sass::Plugin.options.merge!(
:template_location => 'public/stylesheets/sass',
:css_location => 'tmp/stylesheets'
)
Rails.configuration.middleware.delete('Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Rack::Static',
:urls => ['/stylesheets'],