Skip to content

Instantly share code, notes, and snippets.

<div class="well">
<form class="form">
<div data-behaviour="checkbox-toggle-group">
<input name="blackout[fixed_end]" type="hidden" value="0">
<input class="is-hidden js-checkbox-toggle" id="blackout_fixed_end" name="blackout[fixed_end]" type="checkbox" value="1">
<div class="form-group js-toggle-group">
<label class="form-label" for="blackout_duration">To</label>
<div class="form-fields">
<input class="field-text ten percent" id="blackout_duration" name="blackout[duration]" size="30" type="text">
@pacoguzman
pacoguzman / app.rb
Created November 11, 2012 20:20 — forked from dwt/app.rb
Testing jquery-ui sortable with capybara
# Run via: ruby -rubygems app.rb
require 'sinatra'
require 'haml'
disable :logging
get '/' do
title = "Drag'n'drop issue reduction"
haml :index
end
@pacoguzman
pacoguzman / http_digest_authentication_test.rb
Created March 17, 2012 09:49
Test examples of http digest authentication that doesn't works
require 'isolation/abstract_unit'
require 'rack/test'
require 'digest/md5'
require 'action_controller'
require 'rails'
module ApplicationTests
class HttpDigestAuthenticationTest < ActiveSupport::TestCase
include ActiveSupport::Testing::Isolation
include Rack::Test::Methods
@pacoguzman
pacoguzman / config.ru
Created March 1, 2012 13:07
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
# We are not loading Active Record, nor the Assets Pipeline, etc.
# This could also be in your Gemfile.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
require "rails"
@pacoguzman
pacoguzman / config.ru
Created February 29, 2012 21:53
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin`
# Be sure to have rails and thin installed.
require "rubygems"
require "rails"
# Let's load only action controller. If you want
# to use active record, just require it as well.
require "action_controller/railtie"
class MyApp < Rails::Application
@pacoguzman
pacoguzman / Gemfile
Created November 8, 2011 08:56
ASPGEMS RAILS BestPractices - Dalli
gem 'dalli'
@pacoguzman
pacoguzman / sphinx.yml
Created November 8, 2011 08:50
ASPGEMS RAILS BestPractices - ThinkingSphinx
common: &default_settings
enable_star: true
min_infix_len: 3
charset_table: "0..9, a..z, _, A..Z->a..z, U+00C0->a, U+00C1->a,
U+00C2->a, U+00C3->a, U+00C4->a, U+00C5->a, U+00C7->c, U+00C8->e,
U+00C9->e, U+00CA->e, U+00CB->e, U+00CC->i, U+00CD->i, U+00CE->i,
U+00CF->i, U+00D1->n, U+00D2->o, U+00D3->o, U+00D4->o, U+00D5->o,
U+00D6->o, U+00D9->u, U+00DA->u, U+00DB->u, U+00DC->u, U+00DD->y,
U+00E0->a, U+00E1->a, U+00E2->a, U+00E3->a, U+00E4->a, U+00E5->a,
U+00E7->c, U+00E8->e, U+00E9->e, U+00EA->e, U+00EB->e, U+00EC->i,
@pacoguzman
pacoguzman / Gemfile
Created November 8, 2011 08:44
ASPGEMS RAILS BestPractices - ExceptionNotification
gem 'exception_notification'
@pacoguzman
pacoguzman / jquery_dialog.css
Created November 4, 2011 11:35
ASPGEMS JS BestPractices - Ventanas Modales
.titleless .ui-dialog-titlebar { display: none }
@pacoguzman
pacoguzman / application.js
Created November 4, 2011 10:09
ASPGEMS JS BestPractices - Placeholders
$(function() {
/* "Placeholder jQuery Plugin" */
$('input, textarea').placeholder();
/* "jQuery-Placeholder" */
$('input[placeholder], textarea[placeholder]').placeholder();
});