...alpha channel value, you can use Gimp: Use the color picker tool Hold the Shift key while clicking the pixel A window will appear, containing color information, including the alpha...
When working with feature branches, stale branches pile up over time. It's best to remove them right after merge, locally and on the remote, but it is a little...
...above). Paste this: #!/bin/bash exec < /dev/tty # Get the current branch name branch_name=$(git branch --show-current) # Get the name of the branch that was just merged reflog_message=$(git...
...its advisor model to clarify its approach or to get "help" in more complex situations (like planning or debugging). How to use In Claude Code, type /advisor to open a...
...as an argument to the /advisor command. /advisor fable Your chosen advisor model is saved to your Claude Code settings file; new sessions will use it by default. Currently (August...
...request to save the movie. Select the request from the list and go to the sub-tab Payload. You should see your request's payload as a list of key/value...
...used the square brackets in the payload keys to group all movie attributes into one sub-hash, params['movie']. Let's take a look at only the movie-related attributes...
In this card we will learn to write code that scales with a large number of database records. We will do this by pushing work out of Ruby and into...
...a scope of movies matching the following query format: The query is a list of space-separated words that all need to appear in the movie title for the movie...
...cases beyond that to make your life easier. For this cheatsheat I tried to structure the most useful commands by different use cases, such that a practical oriented overview of...
...some commands I added some tips for their usage and further details on their subcommands For most of the commands shortly explained here, there are some examples along with a...
If you want to make your Rails application be capable of sending SMTP emails, check out the action mailer configuration section in the Ruby on Rails guide.
...will end up having an smtp_settings hash that looks something like this: smtp_settings = { address: ..., domain: ..., port: ..., user_name: ..., password: ..., authentication: ..., tls: ..., enable_starttls_auto: ..., } This hash can be...
By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need to call #html_safe. However, #html_safe does not "unescape...
...a string. It merely marks a string as safe for unescaped insertion. How html_safe works Calling html_safe on a String returns a new object that looks and acts...
...lesson you fetch data from external XML and JSON APIs in Ruby, and learn several techniques for testing code that talks to the network without making your test suite slow...
...no results, ambiguous results. You can test code that talks to the network in several ways — real calls, stubs, request-level mocking (e.g. WebMock), recorded responses (e.g. VCR) — and explain...
TL;DR When using Cache-Control on a Rails application, make sure the Vary: Accept header is set. Proxy caching is a good feature to serve your publicly visible application...
...server SHOULD include a Vary header field with any cacheable response that is subject to server-driven negotiation. Doing so allows a cache to properly interpret future requests on that...
...applications now call an LLM for features that would otherwise be impossible or expensive: summarizing, extracting data from images, recommendations. In this card you build such features into MovieDB with...
...context windows mean for cost and limits. You keep instructions and user input in separate message roles: the system prompt is yours, user content goes into a user message and...
...to keep working. This card walks the spectrum from classic multi-page apps to full single-page apps, explains where we usually land and why — and prepares you for the...
...You can explain the three main web architectures — multi-page app (MPA), progressively enhanced MPA, single-page app (SPA) — and how each splits work between server and browser.
...Form models / presenters No default — a gap in the framework ActiveType form models and presenters Screen-specific validations, callbacks and virtual attributes (sign-up, checkout, wizards) don't belong on...
...RSpec in Rails — balanced comparison 📄 GoodJob README: comparison with other queues 📄 Rendering on the web — server-rendered vs. client-rendered, with the vocabulary Discuss with your mentor Pick three rows...
...diesen verschiedenen Verbindungsversuchen erklären: nc makandra.de 22 nc ccc.de 22 nc app02-stage.makandra.makandra.de 22 Du kannst Sequence-Numbers erklären Du kennst die Unterschiede zwischen UDP und TCP und kannst Beispiele nennen...
...makandra.de aufbauen und die Datei robots.txt abrufen (Siehe https://richj.co/talking-http-1.1/) Du weisst, was dieser Server-Header bedeutet: Strict-Transport-Security: max-age=31536000 IPv6 Wie werden MAC Adressen bei...
...can explain the difference between unit tests and end-to-end tests, with the strengths and costs of each, and why we rarely test controllers or views in isolation.
...path, unit tests for the edge cases. You can write unit tests with RSpec, structured by the behavior under test. You can write end-to-end tests that drive the...
Luckily, this is simple. Just install three packages: sudo apt install ipheth-utils libimobiledevice-dev libimobiledevice-utils Then turn on the "Personal Hotspot" in iPhone settings, connect it to your...
...programmers dislike meetings so much is that they're on a different type of schedule from other people. Meetings cost them more...
whatsmydns.net is an online service that allows you to instantly perform a DNS lookup to check a hostnames current IP Address and other DNS information against a selection of random...
...name servers around the world. This is especially useful to check the current state of DNS propagation after making changes to your domains zones...
In a recent post, Stephan Schmidt makes several suggestions in order to write "Next Generation Java". Unfortunately, I disagree with most of them
Let's say you have a gem which has the following module: # within the imaginary super gem module SuperClient def self.foo 'Foo' end def bar 'Bar' end end
...library extensions). Try to avoid it if possible. Add a lib/ext/super_client.rb to your project (see How to organize monkey patches in Ruby on Rails projects) Add the extension, which overrides...
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both, but the examples shown are for Sprockets.
...your application uses many assets, such as images, javascripts and stylesheets. Without your intervention, the browser will request these assets again and again on every request. There is no magic...
Get "PuTTY Link" and "Pageant" (an SSH key agent) from the PuTTY download page. Run pageant.exe, find its icon inside your system tray and add your SSH key.
...a cmd and put the full path to PuTTY's plink.exe into the GIT_SSH environment variable, e.g.: set GIT_SSH=D:\PuTTY\plink.exe You can then use Git like...