This file contains 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
#spree_wombat | |
#=========== | |
require 'active_model/serializer' | |
module Spree | |
module Wombat | |
class SourceSerializer < ActiveModel::Serializer | |
attributes :name, :cc_type, :last_digits, :month, :year |
This file contains 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
Miguels-MacBook-Air:peach_unified sancho$ rake db:migrate:redo | |
/Users/sancho/.rvm/gems/ruby-2.1.2@peach_ecom/gems/activerecord-4.1.4/lib/active_record/associations.rb:1585: warning: already initialized constant Spree::Store::HABTM_Products | |
/Users/sancho/.rvm/gems/ruby-2.1.2@peach_ecom/gems/activerecord-4.1.4/lib/active_record/associations.rb:1585: warning: previous definition of HABTM_Products was here | |
/Users/sancho/.rvm/gems/ruby-2.1.2@peach_ecom/gems/activerecord-4.1.4/lib/active_record/associations.rb:1585: warning: already initialized constant Spree::Product::HABTM_Stores | |
/Users/sancho/.rvm/gems/ruby-2.1.2@peach_ecom/gems/activerecord-4.1.4/lib/active_record/associations.rb:1585: warning: previous definition of HABTM_Stores was here | |
== 20141006195009 CreateMultipleStores: reverting ============================= | |
== 20141006195009 CreateMultipleStores: reverted (0.0000s) ==================== | |
== 20141006195009 CreateMultipleStores: migrating ============================= | |
rake aborted! |
This file contains 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
view = ActionView::Base.new | |
view.formats | |
=> [:html, :text, :js, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip] | |
ActionView::Base.new.render(inline: "Hello world!") | |
=> "Hello world!" | |
view.render(inline: "<h1> <%= 4 +1 %> Hello world!</h1>") | |
=> "<h1> 5 Hello world!</h1>" |
This file contains 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
# Set your full path to application. | |
app_dir = File.expand_path('../../', __FILE__) | |
shared_dir = File.expand_path('../../../shared/', __FILE__) | |
app_name = "foo" | |
# Set unicorn options | |
worker_processes 2 | |
preload_app true | |
timeout 30 |
This file contains 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
upstream app_1 { | |
# Path to Unicorn SOCK file, as defined previously | |
server unix:/home/deploy/app_1/shared/sockets/unicorn.app_1.sock fail_timeout=0; | |
} | |
server { | |
# Application root, as defined previously | |
root /home/deploy/app_1/public; | |
server_name www.app_1.com app_1.com; |
This file contains 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
DIMENSION_INDEX = { band: 0, bust: 1, across_cup_left: 2, across_cup_right: 3, around_upper_chest: 4, fit_bra_size: 5, bmi: 6, | |
bust_point_to_bust_point: 7, around_upper_chest: 8, across_upper_chest: 9, around_back: 10, nape_to_waist: 11, bridge: 12 } | |
# For weigh is possible ser a value between [0,1]. | |
# INDEX = [ 00,01,02,03,04,05,06,07,08,09,10,11, 12 ] | |
BAND_WEIGH = [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ] | |
CUP_WEIGH = [ 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ] | |
BAND_AND_CUP_WEIGH = [ 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ] | |
ALL_WEIGH = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] |
This file contains 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
<select> | |
<option value="AF">Afghanistan</option> | |
<option value="AX">Åland Islands</option> | |
<option value="AL">Albania</option> | |
<option value="DZ">Algeria</option> | |
<option value="AS">American Samoa</option> | |
<option value="AD">Andorra</option> | |
<option value="AO">Angola</option> | |
<option value="AI">Anguilla</option> | |
<option value="AQ">Antarctica</option> |
This file contains 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
<select> | |
<option value="AFG">Afghanistan</option> | |
<option value="ALA">Åland Islands</option> | |
<option value="ALB">Albania</option> | |
<option value="DZA">Algeria</option> | |
<option value="ASM">American Samoa</option> | |
<option value="AND">Andorra</option> | |
<option value="AGO">Angola</option> | |
<option value="AIA">Anguilla</option> | |
<option value="ATA">Antarctica</option> |
This file contains 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
<select> | |
<option value="4">Afghanistan</option> | |
<option value="248">Åland Islands</option> | |
<option value="8">Albania</option> | |
<option value="12">Algeria</option> | |
<option value="16">American Samoa</option> | |
<option value="20">Andorra</option> | |
<option value="24">Angola</option> | |
<option value="660">Anguilla</option> | |
<option value="10">Antarctica</option> |
This file contains 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
<select> | |
<option value="ISO 3166-2:AF">Afghanistan</option> | |
<option value="ISO 3166-2:AX">Åland Islands</option> | |
<option value="ISO 3166-2:AL">Albania</option> | |
<option value="ISO 3166-2:DZ">Algeria</option> | |
<option value="ISO 3166-2:AS">American Samoa</option> | |
<option value="ISO 3166-2:AD">Andorra</option> | |
<option value="ISO 3166-2:AO">Angola</option> | |
<option value="ISO 3166-2:AI">Anguilla</option> | |
<option value="ISO 3166-2:AQ">Antarctica</option> |
OlderNewer