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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'thor' | |
| require 'dcell' | |
| require 'yaml' | |
| require 'command_line_reporter' | |
| class Filez < Thor | |
| include CommandLineReporter |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> | |
| <!-- | |
| window.location = "http://blogs.ncr.com/converged-multichannel-retailing/"; | |
| //--> |
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
| class Fixnum | |
| def is_palindromic? | |
| self.to_s.reverse.to_i == self | |
| end | |
| end | |
| palindromic_numbers = [] | |
| (100...999).each do |i| | |
| (100...999).each do |g| | |
| new_num = i * g |
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
| class MainTable < ActiveRecord::Base | |
| def self.migrate_from_temp_table | |
| ActiveRecord::Base.transaction do | |
| ActiveRecord::Base.connection.execute("DROP TABLE backup_tables") | |
| ActiveRecord::Base.connection.execute("SELECT * INTO backup_tables FROM main_tables") | |
| ActiveRecord::Base.connection.execute("DROP TABLE main_tables") | |
| #raise ActiveRecord::Rollback | |
| ActiveRecord::Base.connection.execute("SELECT * INTO main_tables FROM temp_tables") | |
| TempTable.destroy_all | |
| 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
| region_hash = Hash.new {|h,k| Region.where(:title => "dummy_region").first } | |
| region_hash["Af Region"] = Region.where(:title => "Africa").first | |
| region_hash["Su Rugsapon"] = Region.where(:title => "Asia-pacific").first | |
| region_hash["Mi Deets"] = Region.where(:title => "Canada").first | |
| region_hash["To McAloon"] = Region.where(:title => "Europe").first | |
| region_hash["Co Peavy"] = Region.where(:title => "Gulf-of-mexico").first | |
| region_hash["Jo Limia"] = Region.where(:title => "Latin-america").first | |
| region_hash["Mi Region"] = Region.where(:title => "Middle-east").first | |
| region_hash["Ti Adams"] = Region.where(:title => "Russia-caspian").first | |
| region_hash["Fa Salem"] = Region.where(:title => "Us-land").first |
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
| module CommonSteps | |
| module Login | |
| extend ActiveSupport::Concern | |
| def create_regular_user | |
| regular_user = FactoryGirl.create(:user) | |
| end | |
| def create_refinery_user | |
| FactoryGirl.create(:refinery_user) |
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
| new_user_session GET /users/sign_in(.:format) devise/sessions#new | |
| user_session POST /users/sign_in(.:format) devise/sessions#create | |
| destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy | |
| user_password POST /users/password(.:format) devise/passwords#create | |
| new_user_password GET /users/password/new(.:format) devise/passwords#new | |
| edit_user_password GET /users/password/edit(.:format) devise/passwords#edit | |
| PUT /users/password(.:format) devise/passwords#update | |
| cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel | |
| user_registration POST /users(.:format) devise/registrations#create | |
| new_user_registration GET /users/sign_up(.:format) devise/registrations#new |
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
| XronoSas::Application.routes.draw do | |
| devise_for :users | |
| # Added by Koudoku. | |
| mount Koudoku::Engine, at: 'koudoku' | |
| match 'pricing' => 'koudoku::subscriptions#index', as: 'pricing' | |
| root :to => "koudoku::subscriptions#index" | |
| 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
| class User < ActiveRecord::Base | |
| # Added by Koudoku. | |
| has_one :subscription | |
| # Include default devise modules. Others available are: | |
| # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | |
| devise :database_authenticatable, :registerable, | |
| :recoverable, :rememberable, :trackable, :validatable |
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
| body{-webkit-animation: spin 30s linear infinite;} | |
| p:before {content: "Code in Ruby! ";} | |
| body, p, body p, body div p {font-family: 'Comic Sans MS', cursive !important;} | |
| html {-webkit-animation: rainbow 8s infinite;} | |
| @-webkit-keyframes blur { | |
| 0% { -webkit-filter: blur(0px); } | |
| 49% { -webkit-filter: blur(0px); } | |
| 50% { -webkit-filter: blur(1px); } | |
| 51% { -webkit-filter: blur(0px); } | |
| 100% { -webkit-filter: blur(0px); } |