...pageview', { 'page': '/YOUR-CUSTOM-PATH' }); With Unpoly With Unpoly you want to trigger an Analytics pageview whenever a major content fragment is replaced. See Unpoly instructions here. Legacy snippet Change this:

...may conflict with that. Here are two solutions that allow you to keep pushing whenever you feel like it. Special commit message To skip a CI run, simply add [ci...

...share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging an application this could be temporary quite handy. Example: class User

...if (p3 !== null) { printPoint(p3); // TypeScript narrows the type to Point2D inside the block } Whenever you apply a check on a specific type, the compiler knows that from there on...

...but you need to call regularly from your preferred scheduler. For example, when using whenever, you should have something like this in your schedule.rb: every :day, at: '05:00', roles...

makandra dev

...the Module class. This method can be overwritten for module instances and is called whenever the module is included somewhere: module Greet def self.included(base) puts "Greet is included into...

...care about the (longer) value and just stores the date part. This means that whenever you pass a time that is within X hours away from midnight (where X is...

...scripts (I use ~/bin/update-chromedriver) and give execute permissions (e.g. via chmod +x ~/bin/update-chromedriver). Then, whenever your Chrome is updated, run update-chromedriver and after one second you are ready to...

github.com

...with a throttling mechanism. Touch events can still be cancelled, mark them as passive whenever you can! Browsers will make some listeners passive by default From MDN: The specification for...

Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that table. Without those timestamps, investigating future bug reports will be...

...names on localhost. This is annoying, since you will sign out your current user whenever you switch to another app. A better way is to use our own daho.im service...

Background Ubuntu always sets the primary display to the 1st (i.e. internal) display whenever I connect to a new Dock/Hub. I want my primary display to be the large...

...iterates over all cleaners and executes your statement for each of them. This means whenever you use this direct call in your code, you actually perform this on a list...

Be careful not to accidentally call any method directly on the DatabaseCleaner module whenever you want to specify different configurations for multiple databases. This will overwrite any individual configuration...

SVG is an acronym for "scalable vector graphics". SVGs should be used whenever an image can be described with vector instructions like "draw a line there" or "fill that space...

...examples with your expectations & implement them. Do so in whatever order works for you. Whenever you notice a new requirement, add it as a new scenario or example. While following...

makandra dev

Best solution: overflow: hidden This is the only reliably working property, use it whenever you can. Caution: This will literally cut off any content that leaves the container. You...

...from summertime to wintertime in different locations, etc.). Try to avoid using time zones whenever possible. When you want to only deal with day times, the handy gem Tod (Time...

Whenever you have to deal with randomness in a jasmine test there are some spy strategies to help you out! Let's say we have a method Random.shuffle(array) to...

You can set up notification hooks to trigger a Desktop notification (or similar) whenever the Claude Code agent halts. This is my configuration: # ~/.claude/notify.sh # Note: You need to `chmod...

makandra dev
github.com

...the PDFKit middleware on your development, you might experience that your application "locks up" whenever you request a .pdf route. This behavior is caused by a deadlock: The Rails process...

makandra dev

...you use the selenium-webdriver gem, it will sneakily phone home once every hour whenever you run a browser based feature spec. Check if you're affected Check if ~/.cache/selenium/se-metadata.json...

...of the groups development and test when deploying to the stages production and staging. Whenever you create custom groups in your Gemfile, make sure to exclude these, if they should...

makandra dev

...config --global core.hooksPath ~/.githooks Store the above snippet to ~/.githooks/pre-push chmod +x ~/.githooks/pre-push Execution Whenever you push, Rubocop will automatically run, and prevent the push if unsuccessful. Note that Rubocop...

...If you set the :validate option to true, then associated objects will be validated whenever you save this object. By default, this is false: associated objects will not be validated...