Skip to content

Instantly share code, notes, and snippets.

WARNING on line 58 of /data/spree/shared/bundle/ruby/1.9.1/bundler/gems/spree-f99c7872424e/core/app/assets/stylesheets/admin/plugins/_jstree.scss: "#jstree-marker" failed to @extend ".icon-caret-right".
The selector ".icon-caret-right" was not found.
This will be an error in future releases of Sass.
Use "@extend .icon-caret-right !optional" if the extend should be able to fail.
source 'https://rubygems.org'
gem 'rails', '3.2.8'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
>> I18n.locale = "nl-NL"
=> "nl-NL"
>> I18n.translate 'cart'
=> "Winkelwagen"
>> I18n.locale = "nl"
=> "nl"
>> I18n.translate 'cart'
=> "translation missing: nl.cart"
1.9.3-p125 :044 > accepts = "en,en-US;0.8,es;0.2"
=> "en,en-US;0.8,es;0.2"
1.9.3-p125 :045 > accepts.scan(/([\w-]{2,})/).map(&:first).map(&:to_sym)
=> [:en, :"en-US", :es]
1.9.3-p125 :046 > accepts.downcase.scan(/([\w-]{2,})/).map(&:first)
=> ["en", "en-us", "es"]
####
symbols = Symbol.all_symbols
@johanb
johanb / mailapp.js
Created August 8, 2012 15:58 — forked from trek/mailapp.js
Mail = Ember.Application.create();
// Let's pretend that Javascript can handle mutliline strings nicely:
Mail.ApplicationView = Ember.View.extend({
template: Ember.Handlebars.compile('
<!-- this gets replaced with content based on state when
connectOutlet is called on ApplicationController -->
{{outlet}}
Started POST "/api/v1/series/?api_key=232a07157860b15f44533789cc07cc36" for 127.0.0.1 at 2012-07-18 17:12:54 +0200
ActionController::RoutingError (No route matches [POST] "/api/v1/series"):
actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
quiet_assets (1.0.1) lib/quiet_assets.rb:20:in `call_with_quiet_assets'
actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
irb
>> require 'date'
=> true
>> Date.today
=> #<Date: 2012-07-12 ((2456121j,0s,0n),+0s,2299161j)>
>> Date.today.to_s
=> "2012-07-12"
>>
module Spree
class PaymentMethod::MollieIdeal < PaymentMethod
include Spree::Core::Engine.routes.url_helpers
preference :partner_id, :string
preference :hostname, :string
preference :test_mode, :boolean
attr_accessible :preferred_partner_id, :preferred_hostname, :preferred_server, :preferred_test_mode
has_many :payments, :as => :source
module Spree
class PaymentMethod::MollieIdeal < PaymentMethod
include Spree::Core::Engine.routes.url_helpers
preference :partner_id, :string
preference :hostname, :string
preference :test_mode, :boolean
attr_accessible :preferred_partner_id, :preferred_hostname, :preferred_server, :preferred_test_mode
def actions