This blog post is a gluing of the following 2 posts that walk through how to setup heroku with Angular 2. Deploy Angular CLI WebPack Project Heroku and Angular CLI Deployment
ng new yoloswag
| def find_missing_number(sequence) | |
| # sort the numbers in ascending numerical order | |
| # non-string values will be at the beginning | |
| # will be the value 0. This doesn't modify | |
| # the actual array (convert it to an integer) | |
| # it just uses this to map to the array. | |
| numbers = sequence.split.sort do |x, y| | |
| x.to_i <=> y.to_i | |
| end | |
| def find_missing_number(sequence) | |
| numbers = sequence.split.sort | |
| prev = 0 | |
| numbers.each do |number| | |
| puts number.inspect | |
| if number.to_i.to_s != number | |
| return 1 | |
| end | |
| if number.to_i != prev + 1 |
This blog post is a gluing of the following 2 posts that walk through how to setup heroku with Angular 2. Deploy Angular CLI WebPack Project Heroku and Angular CLI Deployment
ng new yoloswag
| # config/initializers/carrierwave.rb | |
| CarrierWave.configure do |config| | |
| config.fog_provider = 'fog/aws' # required | |
| config.fog_credentials = { | |
| provider: 'AWS', # required | |
| aws_access_key_id: ENV["AWS_ACCESS_KEY"], # required | |
| aws_secret_access_key: ENV["AWS_SECRET_KEY"], # required | |
| } | |
| config.fog_directory = ENV["AWS_BUCKET"] # required |
| gem "fog-aws" |
| class Image | |
| def initialize(image_array) | |
| @image_array = image_array | |
| end | |
| def output | |
| @image_array.each do |row| | |
| puts row.join(' ') | |
| end | |
| end |
| rm -rf /vagrant/.git |
| Rails.application.routes.draw do | |
| devise_for :users | |
| root 'places#index' | |
| resources :places do | |
| resources :comments, only: :create | |
| resources :photos, only: :create | |
| end | |
| # THIS LINE HERE IS MISSING |