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
# frozen_string_literal: true | |
source 'https://rubygems.org' | |
ruby '2.6.2' | |
gem 'rails', '~> 5.2.3' | |
gem 'pg', '>= 0.18', '< 2.0' | |
gem 'puma', '~> 3.11' | |
gem 'devise', '~> 4.6', '>= 4.6.2' | |
gem 'ahoy_matey' # for user tracking | |
gem 'bootsnap', '~> 1.4', '>= 1.4.3', require: 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
data = [] | |
File.open("Gemfile").each do |line| | |
data << line if line.size > 1 unless line.include?("#") | |
end | |
File.delete("Gemfile") | |
File.open("Gemfile", 'w') do |file| | |
data.unshift("# frozen_string_literal: true \n\n") |
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
scope "/auth", Discuss do | |
pipe_through :browser | |
get "/:provider", AuthController, :request | |
get "/:provider/callback", AuthController, :callback | |
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
defmodule Discuss.TopicController do | |
use Discuss.Web, :controller | |
alias Discuss.Topic | |
def index(conn, _params) do | |
topics = Repo.all(Topic) | |
render conn, "index.html", topics: topics | |
end | |
- Separate out the things that change from those that stay the same
- Build systems that allow you to contain the damage
- Build to avoid combing through code whenever a change or new functionality is needed
- Program to an interface, not to implementation
- Write code that is less tightly coupled to itself in the first place.
- Program to the most general type that you can. For example, if you need need a
Car
class, but will also need a train, plane or boat, why not try to get away with aVehicle
class. Ruby is designed to help you program to the most general types. This also reduces the total amount of coupling in our code. In other words, design to alter the least amount of classes when a change or feature is required, making code less likely to break in the face of change.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AlternateMouseScroll</key> | |
<true/> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.25882354378700256</real> |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
-[] aws_lb_target_group.partner_portal: 1 error(s) occurred:
-[] aws_lb_target_group.partner_portal: Error creating LB Target Group: DuplicateTargetGroupName: A target group with the same name 'partner-portal-chip-beta' exists, but with different settings status code: 400, request id: bc0f8691-893b-11e8-9f5b-3713e77d7dcc -[] aws_db_subnet_group.postgres: 1 error(s) occurred:
-[] aws_db_subnet_group.postgres: Error creating DB Subnet Group: DBSubnetGroupAlreadyExists: The DB subnet group 'chip.beta' already exists. status code: 400, request id: 0d61d300-8fc5-4344-8071-1714b29b6060 -[] aws_lb_target_group.partner_engine: 1 error(s) occurred:
NewerOlder