| https://www.loom.com/share/c14c2822d71b4567a5015372f560c4cc | |
| https://www.loom.com/share/10aa2e3607ff411e9f3ad9f41a7780c4 | |
| 3rd part of the presentation with Explanations for Virtual DOM and Redux data flow | |
| https://www.loom.com/share/3bc1dbcef303408a9f8616fc605e5604 |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| ## How to hide API keys from github ## | |
| 1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
| retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
| 2. In the terminal, create a config.js file and open it up: | |
| touch config.js | |
| atom config.js |
In this article, I'll walk through a basic Rails (3.2.x) setup for creating a nested resource for two models. Nested resources work well when you want to build out URL structure between two related models, and still maintain a RESTful convention. This code assumes you are running RVM to manage Ruby/Gem versions, and Git for version control.
$ mkdir family # create rvm gemset
$ echo "rvm use --create ruby-1.9.2@family" > family/.rvmrc
$ cd family # install rails
$ gem install rails # create new rails project
$ rails new . # version control | div data-controller='tabs' data-tabs-index='1' | |
| .tabs.is-boxed.is-marginless | |
| ul | |
| li data-target='tabs.tab' | |
| a data={action: "tabs#change"} Tab 1 | |
| li data-target='tabs.tab' | |
| a data={action: "tabs#change"} Tab 2 | |
| .tab.box data={target: 'tabs.tabPanel'} Tab panel 1 | |
| .tab.box data={target: 'tabs.tabPanel'} Tab panel 2 |
| rails g rspec:install | |
| create a rspect for controller | |
| rails g rspec:controller passwords | |
| create a rspect for model | |
| rails g rspec:model widget | |
| rails g factory_girl:model Car name speed:integer |
| Rails 3: If you want to use the file db/seeds.rb to seed you test database before running your specs do this: | |
| Create a file called spec.rake in lib/tasks/ | |
| In this file you stick: | |
| task :spec => ["db:test:prepare", "db:seed"] | |
| and that will do the trick |
| # How to create many instances for tests | |
| context 'Friendship relations' do | |
| # populating users for test | |
| let (:params) { {name: 'usertest', email: '[email protected]', password: 'foobar', password_confirmation: 'foobar'} } | |
| before(:each) do | |
| User.new(params).save | |
| User.new(params).save | |
| User.new(params.merge(gravatar_url: 'mygravatar')).save | |
| end |
