Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...
In a Jasmine spec you want to spy on a function that is imported by the code under test. This...
The cards editor has a feature "Cite other card" to create links to other cards in the same deck as...
You have some SVG files you want to use as icons on your website. How would you embed them?
Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
Here are a few common patterns that will probably lead to flaky specs. If you notice them in your specs...
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
When you build a JSON API you need to come up with a style to represent attributes, pagination, errors or...
Resolve @{-1} to actual branch name. (Happens when merging "-".)
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
I recently wanted to add a model for address information but also wanted to add a unique index to those...
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
I recently had the problem that embedded code boxes crashed my layout. It turned out that pres break out of...
tl;dr With ES2021 you now can use str.replaceAll(), Promise.any(), logical assignment operators, numeric separators and WeakRef on all major...
Code quality can be measured in four levels: (Working code) Reliable code (minimum) Readable code (ok for short-lived code...
Sometimes you will need an input field which wraps content and grows in height as soon as content gets longer...
RSpec's let allows you to super into "outside" definitions, in parent contexts. Example: describe '#save' do subject { described_class.new(attributes...
To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...
This StackOverflow question about nested function definitions in Ruby imparts a good understanding of Ruby's def.
Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...
Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...