- Completely wraps the minitest test lifecycle (
setup
,teardown
, and friends…). This may lead to surprising results. - Supports multiple calls to
around_each
. Each subsequentaround_each
call wraps around the previous one. Is this unintuitive? I don't know. 🤷♂️
This file contains hidden or 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
module Seeders | |
class Base | |
def seed!(builder, findable_attributes, unstable_attributes = {}) | |
builder.find_or_create_by!(findable_attributes) do |config| | |
config.assign_attributes(unstable_attributes) | |
end | |
end | |
end | |
class Builder |
This file contains hidden or 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
1Password 7.app | |
Alacritty.app | |
App Store.app | |
Atom.app | |
Audacity.app | |
Automator.app | |
Basecamp 3.app | |
Be Focused Pro.app | |
Be Focused.app | |
Beaker Browser.app |
This file contains hidden or 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
if Gem::Version.new("2.6") <= Gem::Version.new(RUBY_VERSION) | |
def compose(*funcs) | |
funcs.map(&:to_proc).reduce(:<<) | |
end | |
else | |
def compose(*funcs) | |
funcs.map(&:to_proc).reduce { |f, g| ->(*x) { f.call(g.call(*x)) } } | |
end | |
end |
This file contains hidden or 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
def gauss(x:, σ:, µ:) | |
Math.exp(-(x - µ)**2 / (2.0 * σ**2))/(σ * 2.5) | |
end |
This file contains hidden or 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
*/* | |
!/*.js | |
!/*.json | |
!/lib | |
!/vendor | |
# node_modules | |
# npm-debug.log | |
# out | |
# dist |
This file contains hidden or 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
# Vanilla | |
Thing1.transaction do | |
Thing2.transaction do | |
Governor.allowing_malarkey do | |
Logger.with_context(some: :context) do | |
Auditor.with_context(some: [:more, :context]) do | |
do_a_thing | |
end | |
end |
This file contains hidden or 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
copy(Array.from(new Set(Array.from(document.getElementsByTagName("a")).filter(element => element.textContent.startsWith("Check")).map(element => element.textContent.replace(/Check failure on line \d+ in /, '')))).join(" ")) |
This file contains hidden or 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
😎 |
I hereby claim:
- I am pingortle on github.
- I am pingortle (https://keybase.io/pingortle) on keybase.
- I have a public key ASDdzMBjB_KEboIXEmrJvAuon9g6lIZR3Z0KREwT5svJUAo
To claim this, I am signing this object: