...gitignore, see https://makandracards.com/makandra/15947 [diff] algorithm = patience # A slower algorithm that sometimes produces better diffs [fetch] prune = true # Remove local remote-tracking branches that have been deleted [rebase]
main-view = date:relative author:abbreviated commit-title:graph=true,refs:true A better diff tool You may switch to delta, a fancy diff tool with syntax highlighting and...
You can use the code below to check whether the browser can make connections to the current site: await isOnline...
In a JavaScript console, type this: > 9112347935156469760 9112347935156470000 Ooops. And that's not a float! This occurs because JavaScript uses...
around do |example| superuser_power = Power.new(create(:user, :superuser)) Power.with_power(superuser_power) do # before-block will be run here, DB snapshot will be created example.run # after-block will...
...version you want to use for each bundler command, e.g. bundler _2.1.4_ update New behavior Bundler now honors the version specified under BUNDLED_WITH in the Gemfile.lock. The necessary version...
gem update --system Updating the bundler version for a project With the new behavior bundler should never update its version in a Gemfile.lock automatically anymore. Therefore, unless there are...
You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...
Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts The Rails default is using rake tasks for your application tasks. These...
run_script(subject, 42, 'some_arg') assert_something end end Further reading Best practices: Writing a Rails script (and how to test it...
In Ruby, the meaning of protected and private is different from other languages like Java. (They don't hide methods...
...set :bundle_without, %w[development test cucumber deploy].join(' ') Be aware, that gems that belong to two groups, are only excluded, when both of the groups are excluded, e.g. to...
A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem...
In a nutshell: Use git rebase --onto target-branch source-commit target-branch means "branch you want to be based...
Ubuntu 24 added some guarding for Python packages which no longer allows installing applications through pip on system level. Instead...
...the inert field. It might might as well be removed from the page. This behavior is OK if the fields might as well be hidden, and you're just looking...
...of your workload, a fixed-CPU instance from the M or C series offers better performance for a lower price. General T instances have a Baseline utilization per vCPU.
...Every burstable instance has a CPU utilization break-even when a fixed-CPU instance becomes cheaper. The fixed CPU instances are not only cheaper at that point, they also offer...
...either build a ES cluster or you disable the replicas. Building a cluster is beyond the scope of this card, but we can have a look how we can disable...
...localhost:9200/_cat/shards?pretty' | grep UNASSIGNED If it's a replica (r in the column befor the UNASSIGNED) and you are on a single node elasticsearch you need to disable replicas...
Exercise 1: Maps In MovieDB, add a new field “Principal filming location”. In a movie’s show view, geocode that...
...like these before applying them to production. When entering these rules in the screen behind the Edit Test Rules button in the AWS console and testing it, the results section...
...pre-existing mocks inside the block, they are not reverted to the previously mocked behavior. This is usually not relevant and you should be fine in most cases...
If you're using a Redis cache in Rails (e.g. :redis_cache_store), it's possible to configure additional parameters...
...described above. legacy_transforms.rb This file adds a Transform method to the Cucumber "World" which behaves similar to the Cucumber 1 and 2 transformations. This allows cucumber_factory to keep using...
You can ignore certain commits when using git blame with the --ignore-revs-file option. This is handy to ignore...
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...
...provide a lot of ways to style your scrollbars for now, it might be best to only use them in Browsers that don't support the non-standard scrollbar styling...