Implement a simple web page containing a login form, composed by the following form elements:
- Email text field
- Password field
- "Login" button
Requirements:
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| projects = %w[ | |
| project-1 | |
| project-2 | |
| etcetc | |
| ] | |
| Vagrant.configure("2") do |config| |
| name: my-project | |
| library: | |
| source-dirs: | |
| - app | |
| - src | |
| - lib | |
| dependencies: | |
| - base >= 4.7 && < 5 | |
| - ... |
| leandro = new_instance(Account, "Leandro", 0) | |
| john = new_instance(Account, "John", 100) | |
| send_message(leandro, :deposit, 50) | |
| send_message(john, :deposit, 10) | |
| send_message(leandro, :print_balance) | |
| # => Leandro's balance: 50 | |
| send_message(john, :print_balance) |
| config: | |
| gcp:project: "my-project-created-on-gcp" |
| require 'benchmark' | |
| def sum_range_using_for_loop(min, max) | |
| range = (min..max) | |
| sum = 0 | |
| for n in range | |
| sum = sum + n | |
| end |
| require 'faker' | |
| require 'benchmark' | |
| def generate_groups | |
| (1..1_000).map do |id| | |
| { id: id, name: Faker::Educator.primary_school } | |
| end | |
| end | |
| def generate_users(groups_ids) |
| ab -n 20 -c 5 | |
| Req per seconds Time per req (ms) | |
| Threads – IO 232 21 | |
| Fibers – IO 450 11 | |
| Threads – External Req 1.85 2703 | |
| Fibers – External Req 7.97 627 |