Skip to content

Instantly share code, notes, and snippets.

View guigs's full-sized avatar

Guilherme Goettems Schneider guigs

View GitHub Profile
@guigs
guigs / form-group.html
Created March 29, 2018 17:26
input-validation-error-bootstrap-3-and-4
<div class="form-group">
<label class="control-label" for="inputError1">Input with error</label>
<input type="text" class="form-control is-invalid" id="inputError1">
<div class="invalid-feedback">Error message</span>
</div>
require 'benchmark/ips'
require 'benchmark/memory'
require 'set'
SIZE = 10_000
def get_number
rand(1000)
end
@guigs
guigs / coverband-cache-ignored-files-benchmark.rb
Created December 2, 2016 17:37
Coverband cache ignored files benchmark
require 'benchmark/ips'
require 'benchmark/memory'
require 'set'
SIZE = 10_000
FILES = Array.new(100) do
dir = rand(2) == 1 ? Dir.pwd : '/other'
dir << '/gems' unless rand(3) == 1
name = [*('A'..'Z')].sample(8).join