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
-# Example form | |
= simple_form_for @some_model do |f| | |
-# Show error notification at top (general error text) | |
= f.error_notification | |
-# Show base errors at top | |
= f.error_notification message: (f.error :base) if f.object.errors[:base].present? | |
-# Regular input | |
= f.input :name, autofocus: true | |
-# Select input referencing other model |
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
Style/StringLiterals: | |
EnforcedStyle: double_quotes | |
Layout/ArgumentAlignment: | |
EnforcedStyle: with_fixed_indentation | |
Style/ConditionalAssignment: | |
EnforcedStyle: assign_to_condition | |
Layout/EndAlignment: | |
EnforcedStyleAlignWith: variable | |
AutoCorrect: true | |
Layout/MultilineMethodCallIndentation: |
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 MyObj | |
include ActiveModel::Model | |
include ActiveRecord::AttributeAssignment | |
attr_accessor :my_date | |
def initialize(*params) | |
assign_attributes(*params) | |
end |
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 firebase from 'firebase/app'; | |
import 'firebase/auth'; | |
import 'firebase/database'; | |
// Initialize Firebase | |
const config = { | |
apiKey: process.env.REACT_APP_APIKEY, | |
authDomain: process.env.REACT_APP_AUTHDOMAIN, | |
databaseURL: process.env.REACT_APP_DATABASEURL, | |
projectId: process.env.REACT_APP_PROJECTID, |
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
# spec/support/factory_bot.rb | |
RSpec.configure do |config| | |
config.include FactoryBot::Syntax::Methods | |
end | |
# spec/support/database_cleaner.rb | |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :transaction | |
DatabaseCleaner.clean_with(:truncation) |
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
#! /bin/bash | |
# install docker-ce on linux mint 18 "Sarah" | |
# prepare | |
sudo apt-get remove docker docker-ce docker-engine docker.io | |
# download | |
wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_17.12.0~ce-0~ubuntu_amd64.deb |
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 Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | |
Devise.omniauth_configs.keys.each do |provider| | |
define_method(provider.to_s) { omniauth_callback(provider) } | |
end | |
def failure | |
redirect_to root_path | |
end | |
private |
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
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} | |
/* Extra Small Devices, Phones */ | |
@media only screen and (min-width : 480px) { |