...behavior, you can explicitely tell ActiveRecord how to preload associations with either JOINs or separate queries. This card gives an overview of the different options to preload associations, but
...for preloading! Please have a look on on our card why you should be super careful with complex eager_load or includes queries. Thus, as a general guideline.includes or .eager...
When debugging slow SQL queries, it’s helpful to understand the database engine's query plan. Whenever you execute a declarative SQL query, the database generates a "query plan" that...
...outlines the exact steps the engine will take to execute the query. Most of the time, we don’t need to worry about this plan because SQL engines are highly...
...the everyday use without any parameter tweaking I'm using a collection of tiny scripts in my ~/bin folder that can then be used as bash functions. And: It's...
...video-to-audio /path/to/cake.mp4 cake.mp3 audio-to-audio /path/to/cake.mp3 cake.aac image-to-image /path/to/cake.png cake.jpg stateDiagram-v2 text --> image: Dall-E 3 text --> audio: GPT TTS image --> text: GPT Vision...
WebRTC HTTP/2 is here, let’s optimize! or, why (some) yesterday's best-practices are today's HTTP/2 anti-patterns...
If the application under test makes sound, you probably want to disable this during integration testing. You can use the args option to pass parameters to the browser. For Chrome...
...Capybara.register_driver :selenium do |app| Capybara::Selenium::Driver.new(app, browser: :chrome, args: ["--mute-audio"]) end I haven't found a corresponding command line option for Firefox. Hat tip to kratob...
Scroll and touch event listeners tend to be computationally expensive as they are triggered very often. Every time the event is fired, the browser needs to wait for the event...
...quoted from WICG's explainer on passive event listeners. See this demo video for a side-by-side comparison. While there are particular scenarios where an author may indeed want...
...you're already doing it wrong, but maybe the hour is late and your standards for success are slipping. Anyway here is how to hide the controls in the default...
...Flash video player component: Select the player frame on the stage. Open the component inspector by selecting Window -> Component Inspector or clicking a funny unlabeled icon in the player properties...
...like json or yaml). When you use it, it has an opinion on every single whitespace and linebreak, as well as a few other things. You renamed a variable and...
...prettier will reformat your code. This might not work for you if you have strong opinions yourself. You cannot configure it to do exactly what you want, there a deliberately...
...browser trust the certificate so it does not show warnings for your own certificate. Easy: self-signed certificate To just create a certificate for localhost, you can use the following...
...can then access your application at https://localhost:3000/. Your browser will complain about the self-signed certificate, but you can ignore the warning in that case, since you are...
...to compile the new main.ts file, e.g.: { // other options like "extents":, "compilerOptions":, "include": "files": [ "src/app/shared/spec/setup/main.ts" ], } Why Use a Custom Test Entry Configure global test environment providers Register custom Jasmine matchers...
...and test utilities Load icons, themes, and other test-wide setup Replace CLI's auto-generated bootstrap with your own Important: Keep TestBed options aligned with CLI defaults (strict error...
Add apt source: apt update -y && apt install -y gpg sudo wget curl sudo install -dm...
.../etc/apt/keyrings wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
...default to using the element as the main document viewport. In CSS, prefer to set overflow properties to html (or :root). Scrolling the main viewport with JavaScript
...main document viewport is also scrollable by default. The element that corresponds to the main viewport is either (document.documentElement) or (document.body). Which one depends on the browser.
...in coding lies in crafting precise prompts. The main challenge is learning how to structure prompts effectively to guide the model toward accurate results. Further evidence supporting this is the...
...that Aider already writes ~70% of its own code (as of 02/2025). However, when starting out, your results may fall short of efficiently generating large portions of your code with...
...order to open a Nautilus window in your terminal's working directory, you can say:
Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy language. Many of our applications can’t function without it...
...the same practices we use with real languages. This framework agnostic talk takes a serious look at how we develop JavaScript applications. Despite its prototypical nature, good object-oriented programming...
...t!. They will raise I18n::MissingTranslationData on a missing translation instead of printing a string like translation missing: de.custom.failure. To turn on raising globally, you need to replace the default...
If you use Tempfile and pass your own filename containing an extension, it will just be consumed by the Tempfile...
...quite frustrating to come back to a coding agent after a while only to see that it needed user input only 10 seconds into the task. You can set up...
...notification hooks to trigger a Desktop notification (or similar) whenever the Claude Code agent halts. Clicking the notification will open your configured IDE in the correct project directory.
This card is a general reminder to avoid the short version of a command option in shared code. It's much easier to understand a command and search for an...
...option when it's written out. You can still use the short version of the options in your own terminal or in code snippets that are more useful when they...
These warnings are printed when the etc Gem is installed, while etc is also included in Ruby. Fix with:
...some behavior you may eventually run into when upgrading your application. This aims to save you some time understanding what happens under the hood to possibly discover problems faster as...
...renamed to denylists. You will have to rename all occurrences in your code. Make sure that you have defined a trait for validating the extensions and content types in all...
...configured timeout. This can become an issue if you rely on the timeout to strike precisely...
...when they chose MongoDB?” But what you may not realize is that you are seeing the application as it exists today. When the previous developer (or team) had to develop...
...cloak of opacity. You are cursed with the knowledge of the present, so the system seems like a hackjob of bad decisions...
...event. However, this is not defined by the W3C. Most importantly, Firefox does not support it, neither do recent versions of IE. You should completely avoid accessing the global event...