Skip to content

Instantly share code, notes, and snippets.

@israelb
israelb / cucumber-rails.md
Created February 2, 2022 20:03 — forked from stepheneyer/cucumber-rails.md
BDD testing using Cucumber, Capybara, and Rails

#Cucumber and Capybara - Behavior Driven Development

##Overview

Cucumber allows software developers to describe how software should behave in plain text. The text is written in a business-readable, domain-specific language. This allows non-programmers to write specific feature requests that can be turned into automated tests that drive development of the project.

Capybara is the largest rodent known to man.

@israelb
israelb / curl.md
Created January 25, 2023 20:59 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@israelb
israelb / fix_NSCFConstantString_initialize.txt
Created May 17, 2023 15:16 — forked from zanetagebka/fix_NSCFConstantString_initialize.txt
Solve issue with objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
# If you have issue with
# objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
# objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
# I had this problem when running `bin/rails c` on Mac M1 Pro. The solution for this is below
$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
$ export DISABLE_SPRING=true
This should help.
@israelb
israelb / reservation.md
Last active June 8, 2023 21:33
Reservation Pattern

The Reservation Pattern

Introduction

The reservation pattern is a pattern for dealing with message reissues. That is, when the sender of a message sends the same message twice. Because of the laws of distributed systems, it is impossible for a sender to know if their message was received with 100% confidence. Senders will often approach this problem by utilizing "at-least-once" delivery. In other words, they may send the same message more than once.

@israelb
israelb / instructions.sh
Created September 12, 2023 16:00
Update bundler ruby on rails Gemfile.lock
1. Install the latest bundler version:
gem install bundler
2. Update the bundler version in Gemfile.lock
bundle update --bundler
3. Confirm it worked: