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
# add devise gem to Gemfile.rb, go to RubyGems to get latest version # | |
gem 'devise' | |
# Build Devise | |
rails g devise:install | |
# Add correct mailer in development.rb, config method will appear in terminal output after installing | |
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } | |
# Generate Devise views |
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. install redis gem file: | |
gemfile.rb -> gem 'redis', '3.3.1' | |
2. bundle install | |
3. include redistogo addon: | |
$ heroku addons:create redistogo | |
(may have to set it up in heroku account dashboard???) | |
4. update cable.yml: |
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
# add rack-cors to gem file | |
gem 'rack-cors' |
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 this tutorial](https://medium.com/@ajayramesh/social-login-with-omniauth-and-rails-5-0-ad2bbd2a998e) | |
# 1. Register your app with Google, get credentials and secret | |
# Authorized redirect should be: http://localhost:3000/auth/google_oauth2/callback | |
# enable Google+ API and Contacts API | |
# 2. Include OmniAuth gem in gemfile: | |
# gem ‘omniauth-google-oauth2’ |
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. set dimensions of SVG relative to chart width and window height - navbar | |
let margin = {top: 50, right: 50, bottom: 50, left: 50}, | |
width = $('#chart').width() - margin.left - margin.right, | |
height = window.innerHeight - margin.top - margin.bottom - $('#nav').height(); | |
// 2. create SVG appended to #chart, dimensions come from values set above | |
let svg = d3.select('#chart').append('svg') | |
.attr('width', width + margin.left + margin.right) | |
.attr('height', height + margin.top + margin.bottom) | |
.append('g') |
NewerOlder