Skip to content

Instantly share code, notes, and snippets.

@bobanj
bobanj / wysihtml5-resize.js
Created May 4, 2012 09:42 — forked from micho/wysihtml5-resize.js
wysihtml5 resize plugin. Depends on jQuery and Underscore
(function () {
var setupRegularResize, setupIframeResize, e;
function bind(a, b) {
return function () {
return a.apply(b, arguments);
};
}
setupRegularResize = (function () {
@bobanj
bobanj / capybara.md
Created July 6, 2012 23:14 — forked from steveclarke/capybara.md
RSpec Matchers

Capybara

Matchers

have_button(locator)

have_checked_field(locator)
@bobanj
bobanj / time.rake
Created July 8, 2012 06:27 — forked from pjb3/time.rake
def format_time_interval(from_time, to_time)
seconds = (to_time - from_time).abs.round
minutes, seconds = seconds.divmod(60)
if minutes > 60 * 24
" "
elsif minutes > 60
hours, minutes =
" %2dh %2dm " % minutes.divmod(60)
else
" %2dm %2ds " % [minutes, seconds]
@bobanj
bobanj / 01. Gemfile
Created July 13, 2012 22:45 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth
gem 'pg'
group :development do
gem 'ruby-debug'
end
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'oa-oauth', :require => 'omniauth/oauth'
gem 'omniauth'
gem 'haml'
gem 'dynamic_form'
include Rails.application.routes.url_helpers
default_url_options[:host] = "localhost"