Getting started:
Related tutorials:
#!/bin/bash | |
function prompt_for_multiselect { | |
# little helpers for terminal print control and key input | |
GREEN='\033[00;32m' | |
YELLOW='\033[00;33m' | |
RESTORE='\033[0m' | |
ESC=$( printf "\033") | |
cursor_blink_on() { printf "$ESC[?25h"; } |
# 30 minute limit to implement the 99 bottle exercise | |
# Finished in 25 minutes, spent 5 minutes on light refactoring | |
# | |
class Bottles | |
def verse(number) | |
first_verse(number) + second_verse(number) | |
end | |
def verses(biggest_bottle, smallest_bottle) | |
biggest_bottle.downto(smallest_bottle).each do |number| |
Getting started:
Related tutorials:
dd -> delete line | |
D -> delete line content | |
p -> paste after cursor | |
P -> paste before cursor |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |