Skip to content

Instantly share code, notes, and snippets.

View geraldolsribeiro's full-sized avatar

Geraldo Ribeiro geraldolsribeiro

View GitHub Profile
Map<String, double> produtos = new Map();
bool mostrarMenuNaCompra = true;
bool mostrarDebug = false;
void montarCatalogoDeProdutos() {
produtos["Borracha"] = 123.20;
produtos["Lápis"] = 0.50;
produtos["Caneta"] = 10.10;
produtos["Apontador"] = 2.50;
}
@geraldolsribeiro
geraldolsribeiro / Capybara.md
Created August 21, 2017 15:51 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
(function closure () {
// progressively draw each <svg> without .no-draw class
Array.prototype.forEach.call(document.querySelectorAll('svg:not(.no-draw)'), function(svg) {
// animation duration & delay (default values overriden by data attributes)
var animationTimeInSeconds = Number(svg.getAttribute('data-draw-time')) || 2;
var animationStartDelay = Number(svg.getAttribute('data-draw-start-delay'))*1000 || 0;
// init, hide all svgs
var totalFrames = animationTimeInSeconds * 60;