This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*= require bootstrap | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'faye' | |
require 'json' | |
require 'rack' | |
require 'cgi' | |
module Faye | |
class SyncMiddleware | |
include ::Faye::Logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
RAILS_VERSION = '3.1.0' | |
DM_VERSION = '~> 1.1.0' | |
RSPEC_VERSION = '~> 2.5.0' | |
gem 'activeresource', RAILS_VERSION, :require => 'active_resource' | |
gem 'activesupport', RAILS_VERSION, :require => 'active_support' | |
gem 'actionpack', RAILS_VERSION, :require => 'action_pack' | |
gem 'actionmailer', RAILS_VERSION, :require => 'action_mailer' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= stylesheet_link_tag 'application', :media => 'all' | |
= stylesheet_link_tag 'app/print', :media => 'print' | |
-# implement the however you want obviously, just here as an eg. | |
- unless @theme.nil? | |
= stylesheet_link_tag "theme/#{@theme}" | |
- if controller_specific_styles? | |
= stylesheet_link_tag "app/#{params[:controller]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use via this in application.rb: | |
# config.middleware.insert_after(ActionDispatch::Flash, FlashPreserver) | |
class FlashPreserver | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
flash = (session = env['rack.session']) && session['flash'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sass/rails/importer' | |
if defined?(Sass::Rails::VERSION) && Sass::Rails::VERSION[0..3] >= '3.1.' | |
Rails.logger.warn ' == MONKEY == Patching sass-rails: https://github.com/rails/sass-rails/pull/70' | |
Rails.logger.warn " == MONKEY == Please remove #{__FILE__} once Sass::Rails upstream has pulled in the fix" | |
# monkey patch to incorporate https://github.com/rails/sass-rails/pull/70 | |
module Sass | |
module Rails | |
class Importer | |
def resolve(name, base_pathname = nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
gem 'mysql2', :platforms => :ruby # causes this gem to be skipped on windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
◯ markt@hibbert$ rvm use 1.9.2 [ruby-1.9.3-p0] 10174 [12:36:27] | |
Using /Users/markt/.rvm/gems/ruby-1.9.2-p290 | |
◯ markt@hibbert$ ruby /tmp/test_yaml.rb syck [ruby-1.9.2-p290] 10183 [12:38:05] | |
RUBY_VERSION: 1.9.2 290 syck | |
5000 ... markt 74572 20.8 0.1 2450584 11516 s011 S+ 12:38pm 0:00.12 ruby /tmp/test_yaml.rb syck | |
10000 ... markt 74572 20.8 0.2 2459800 16064 s011 S+ 12:38pm 0:00.17 ruby /tmp/test_yaml.rb syck | |
15000 ... markt 74572 47.3 0.2 2459800 16072 s011 S+ 12:38pm 0:00.23 ruby /tmp/test_yaml.rb syck | |
20000 ... markt 74572 47.3 0.2 2459800 16072 s011 S+ 12:38pm 0:00.29 ruby /tmp/test_yaml.rb syck | |
25000 ... markt 74572 62.8 0.2 2459800 16076 s011 S+ 12:38pm 0:00.34 ruby /tmp/test_yaml.rb syck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="photos"> | |
<% @album.photos.in_groups_of(20, false) do |photos| %> | |
<div class="slide"> | |
<% photos.each do |photo| %> | |
<li class="photo"> | |
<%= link_to image_tag(photo.source(:square)), photo.source(:large), rel: 'gallery', class: 'fancybox-thumb' %> | |
</li> | |
<% end %> | |
</div> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bmi_htmlEdit = 0; | |
var bmi_ie; | |
var bmi_ns; | |
var bmi_safari; | |
var bmi_imageObjSelected; | |
var bmi_ffx_op_toolTip = "Shift+R improves the quality of this image. Shift+A improves the quality of all images on this page."; | |
var bmi_toolTip = "Shift+R improves the quality of this image. CTRL+F5 reloads the whole page."; | |
var bmi_ns_tooltip = "Shift+Reload reloads the whole page."; | |
var bmi_toolTipSeperator = " ... "; | |
var bmi_concatStr = "bmi_orig_img"; |