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
inherit_from: .rubocop_todo.yml | |
AllCops: | |
Exclude: | |
- 'bin/*' | |
- 'db/schema.rb' | |
- 'tmp/**/*' | |
- 'vendor/**/*' | |
RunRailsCops: true | |
Documentation: | |
Enabled: false |
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
class Pyramid | |
attr_accessor :layers_number | |
attr_accessor :layers | |
def initialize(layers_number, layers = []) | |
@layers_number = layers_number | |
@layers = layers | |
end | |
def populate_with_random_weights |
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
= form_for resource do |f| | |
= f.form_group :first_name do | |
= f.label :first_name, class: 'control-label' | |
= f.text_field :first_name, class: 'form-control' | |
= f.error_message :first_name |
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
// css/search-form.scss | |
.search-form { | |
> .field { | |
} | |
} | |
// css/search-form/iconic-button.scss |
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
class PhrasesController < ApplicationController | |
def index | |
set_cookies | |
@phrases_left = avaible_ids(cookies[:showed_ph]).count | |
@phrases = Phrase.find(cookies_to_array(cookies[:showed_ph])) | |
end | |
def random_phrase | |
all_ids = avaible_ids(cookies[:showed_ph]) | |
@phrases_left = all_ids.count - 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
class PalindromSearcher | |
attr_accessor :string | |
def initialize(string) | |
@string = string | |
end | |
def longest | |
return unless all.any? | |
all.max_by(&:length) |
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
/* webfont */ | |
@import 'https://fonts.googleapis.com/css?family=Roboto'; | |
body, | |
button, | |
html, | |
input, | |
select, | |
textarea { |
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
import urlWithParams from 'urlWithParams' | |
fetch( | |
urlWithParams('/api/v1/cities.json', { | |
name: input, | |
city_id: this.state.cityID, | |
}) | |
) | |
.then((response) => response.json()) | |
.then((json) => { |
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
p = user.ip_addresses.size | |
p = user.ip_addresses.value |
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
inherit_from: .rubocop_todo.yml | |
AllCops: | |
Exclude: | |
- 'bin/*' | |
- 'db/schema.rb' | |
- 'node_modules/**/*' | |
- 'vendor/**/*' | |
TargetRubyVersion: 2.4 | |
Layout/IndentationConsistency: | |
EnforcedStyle: normal |
OlderNewer