Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...
You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...
Interactively rebase your current branch onto main, keeping the original base commit (i.e. not rebasing onto main directly).
What is a Cookie? Google it if you do not know. How are cookies transferred between your browser and...
Use rules to include or exclude jobs in pipelines. Rules are evaluated in order until the first match. When a...
...API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and select the best available source video.currentSrc // The selected source video.currentTime // The current playback time...
If your postgres database is only accessible from inside a kubernetes cluster, e.g. if it's configured in AWS RDS...
We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...
...methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spend tons of ink printing the background of a...
Learn Enough Command Line to be Dangerous (it's in our library => Google Drive) CLI tricks every developer should...
...for Rails 2 and 3. Recently, caching with timestamp- or content-based keys has become more popular which saves you the pain of invalidating stale caches. How to enable/disable caching...
Website that offers lots of different kinds of HTTPS configurations, bad or good or complicated. They also offer a dashboard...
Ever needed to use a global variable in Rails? Ugh, that's the worst. If you need global state, you...
A good tool to generate strong passwords and secrets is "apg". You can get it with sudo apt-get install...
This card shows you how to center a float horizontally in CSS. Also: find out what techniques are available for...
We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...
...lot of logic and callbacks for a particular form screen, but then the model becomes a pain in tests, where all those callbacks just get in the way. Or we...
...have different forms for the same model but they need to behave very differently (e.g. admin user form vs. public sign up form). There are many approaches that promise help...
A primer on vector graphics For rastered image formats like JPG or PNG, each pixel is basically drawn on a...
...file_inside' do let(:path) { '/opt/invoices/' } it 'should send a requested file that lives beneath the given directory' do subject.should_receive(:send_file).with('/opt/invoices/123.pdf', {}) subject.send :send_file_inside, path...
For performance improvements (and to remove the need for eager loading), the ActsAsTaggableOn gem supports caching your tag lists directly...
Canonical does not ship Ubuntu 24.04+ Vagrant images due to HashiCorps switch to the Business Source License (BSL). There is...
These steps are now part of Spreewald. Here are some useful examples how to use the attached Cucumber Timecop steps...
Sometime we've seen this error when executing e.g. bundle exec rake asset:precompile: double free or corruption (out)
Recent IRB versions include a multi-line autocomplete which may be helpful to novice users but can be distracting.