You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
Victor Velazquez
vicmaster
Coder, Musician, Startups, Passionate Dancer & Life Lover. Director of Engineering at MagmaLabs, Co-founder of Web Dev Talks, Voltaire, Paqkit, and Zaznova.
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
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
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler
This guide enables you to install (ruby-build) and use (rbenv)
multiple versions of ruby, isolate project gems (gemsets and/or bundler), and
automatically use appropriate combinations of rubies and gems.
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
The game consists of 10 frames as shown above. In each frame the player has two opportunities to knock down 10 pins. The score for the frame is the total number of pins knocked down, plus bonuses for strikes and spares.
A spare is when the player knocks down all 10 pins in two tries. The bonus for that frame is the number of pins knocked down by the next roll. So in frame 3 above, the score is 10 (the total number knocked down) plus a bonus of 5 (the number of pins knocked down on the next roll.)
A strike is when the player knocks down all 10 pins on his first try. The bonus for that frame is the value of the next two balls rolled.
When you find you have to add a feature to a program, and the program's code is not structured in a convenient way to add the feature, first refactor the program to make it easy to add the feature, then add the feature.
Before you start refactoring, check that you have a solid suite of tests. These test must be self-checking
Refactoring changes the programs in small steps. If you make a mistake, it is easy to find the bug.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
The mock_auth configuration allows you to set per-provider (or default) authentication hashes to return during integration testing. You can set it like so:
The mock_auth configuration allows you to set per-provider (or default) authentication hashes to return during integration testing. You can set it like so:
You can set the :default key to return a hash for providers that haven't been specified. Once you set the mock auth hash and turn on test mode, all requests to OmniAuth will return an auth hash from the mock.
The mock_auth configuration allows you to set per-provider (or default) authentication hashes to return during integration testing. You can set it like so: