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
    
  
  
    
  | FROM ruby:2.2.1 | |
| RUN mkdir -p /usr/src/app | |
| WORKDIR /usr/src/app | |
| ENV RAILS_ENV production | |
| ENV REFILE_CACHE_DIR /var/tmp/uploads | |
| RUN curl -sL https://deb.nodesource.com/setup | bash - | 
  
    
      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
    
  
  
    
  | (ns hexlet.codex.actions | |
| (:require | |
| [jayq.core :as jq] | |
| [cljs.core.async :as a] | |
| [hexlet.helpers :as h] | |
| [hexlet.shared :refer [chan]]) | |
| (:require-macros [jayq.macros :as jm])) | |
| (enable-console-print!) | 
  
    
      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
    
  
  
    
  | (ns hexlet.terminal.components | |
| (:require | |
| [cljs.core.async :as a] | |
| [hexlet.shared :refer [chan]] | |
| [quiescent :as q :include-macros true] | |
| [quiescent.dom :as d] | |
| [components.rails :as rails] | |
| [hexlet.helpers :as h] | |
| [hexlet.terminal.actions :as actions])) | 
  
    
      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
    
  
  
    
  | (ns hexlet.quiz | |
| (:require | |
| [hexlet.helpers :as h] | |
| [ajax.core :refer [POST]] | |
| [goog.dom :as gd] | |
| [cljs.core.async :as a] | |
| [quiescent :as q :include-macros true] | |
| [quiescent.dom :as d]) | |
| (:require-macros [cljs.core.async.macros :as am])) | 
  
    
      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 Game = React.createClass({ | |
| getInitialState: function() { | |
| var numbers = _.shuffle(_.range(1, this.props.size * this.props.size)); | |
| var table = []; | |
| var thumb_position = {}; | |
| for (var x = 0; x < this.props.size; x++) { | |
| table[x] = []; | |
| for (var y = 0; y < this.props.size; y++) { | |
| if (x == this.props.size - 1 && y == this.props.size - 1) { | |
| thumb_position = {"x": x, "y": y}; | 
  
    
      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(routes). | |
| -export([compile/0, generate_path/2, generate_url/3]). | |
| compile() -> | |
| List = [root, games, game, start_game], | |
| cowboy_router:compile([ | |
| %% {URIHost, list({URIPath, Handler, Opts})} | |
| {'_', [route(Name) || Name <- List]} | |
| ]). | 
  
    
      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
    
  
  
    
  | --- | |
| - | |
| hosts: default | |
| vars: | |
| database: | |
| password: my_secret_password | |
| # server_name: "codebattle.me" | |
| erlang: | |
| directory: ~/.kerl/erlangs | 
  
    
      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(example). | |
| -export([words_count/1]). | |
| words_count(Str) -> | |
| words_count_ac(Str, outside, 0). | |
| words_count_ac([], _, Acc) -> | |
| Acc; | |
| words_count_ac([Head | Tail], outside, Acc) when Head /= 32 -> | 
  
    
      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
    
  
  
    
  | def word_count(str) | |
| previous = :outside | |
| current = :outside | |
| count = 0 | |
| str.each_char do |char| | |
| case current | |
| when :outside | |
| previous = :outside | |
| if char != ' ' | |
| current = :inside | 
  
    
      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
    
  
  
    
  | 1.9.3-p327 :008 > User.ancestors | |
| => [User(Table doesn't exist), StateMachine::InstanceMethods, User :state instance helpers, UserRepository, UsefullScopes, User::GeneratedFeatureMethods, #<Module:0x007fbb5bd15038>, ActiveRecord::Base, ActiveRecord::Aggregations, ActiveRecord::Transactions, ActiveRecord::Reflection, ActiveRecord::Serialization, ActiveModel::Serializers::Xml, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Store, ActiveRecord::AutosaveAssociation, ActiveRecord::NestedAttributes, ActiveModel::SecurePassword, ActiveRecord::IdentityMap, ActiveRecord::Associations, ActiveModel::Validations::Callbacks, ActiveRecord::Callbacks, ActiveModel::Observing, ActiveRecord::Timestamp, ActiveRecord::AttributeMethods::DeprecatedUnderscoreRead, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, Acti |