Aaron Patterson
https://speakerdeck.com/u/tenderlove/p/aloha-ruby-conference-2012
Zach Holman
$("<img/>") | |
.load(function() { | |
// image loaded | |
}) | |
.error(function() { | |
// oh noes! | |
}) | |
.attr("src", '/path/to/image.jpg'); |
var slugify = function(text) { | |
text = text.replace(/^\s+|\s+$/g, ''); // trim | |
text = text.toLowerCase(); | |
// remove accents | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { |
Aaron Patterson
https://speakerdeck.com/u/tenderlove/p/aloha-ruby-conference-2012
Zach Holman
An Intervention for ActiveRecord by Ernie Miller
https://speakerdeck.com/erniemiller/an-intervention-for-activerecord
Crafting Gems: RailsConf 2013 by Pat Allan
https://speakerdeck.com/pat/crafting-gems-railsconf-2013
Magic Tricks of Testing (RailsConf) by Sandi Metz
https://speakerdeck.com/skmetz/magic-tricks-of-testing-railsconf
Rails is Just Ruby by Jesse Wolgamott
ArgumentError in RailsAdmin::MainController#edit | |
invalid date | |
Rails.root: /Library/WebServer/Documents/work/anchor_cms/_anchor_cms | |
Application Trace | Framework Trace | Full Trace | |
/Users/james/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/date.rb:1576:in `new_by_frags' | |
/Users/james/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/date.rb:1621:in `parse' | |
activesupport (3.1.12) lib/active_support/values/time_zone.rb:273:in `parse' | |
rails_admin (0.4.9) lib/rails_admin/config/fields/types/datetime.rb:49:in `parse_date_string' |
GIT | |
remote: git://github.com/ryanb/cancan.git | |
revision: 4560928dc375f9b31de00381c98334eb6aabc4b9 | |
specs: | |
cancan (1.6.10) | |
GEM | |
remote: http://rubygems.org/ | |
specs: | |
actionmailer (3.1.12) |
/ in ASP | |
.summary = @page.company_summary.content | |
.quote | |
= @page.quote.content | |
em = @page.quote_attribution.content |
TARGET=/path/to/theme | |
USER=deployuser | |
SERVER=ip.or.domain | |
PORT=port | |
cd ~/clone/ | |
find . -type f -iname \*.coffee -delete | |
find . -type f -iname \*.scss -delete | |
find . -type f -iname \*.less -delete | |
find . -type f -iname \*.scssc -delete | |
find . -name .sass-cache -type d -exec rm -r {} + |
# provides a `login(user)` method that works for all controller, request and feature specs | |
# requires devise, rspec and capybara | |
# | |
# usage: | |
# def super_admin_login | |
# role = FactoryGirl.create(:role, name: 'super admin') | |
# user = FactoryGirl.create(:user, first_name: 'SuperAdmin', role: role) | |
# login(user) | |
# end |
namespace :db do | |
desc "Convers the encoding and collation of database, tables and columns." | |
task :convert_encoding, [:character_set, :collation] => :environment do |t, args| | |
args.with_defaults(character_set: 'utf8', collation: 'utf8_general_ci') | |
ActiveRecord::Base.connection.tables.each do |table| | |
ActiveRecord::Base.connection.execute("ALTER TABLE `#{table}` CONVERT TO CHARACTER SET #{args.character_set} COLLATE #{args.collation};") | |
end | |
end | |
end |