RAG is often equated with vector databases, embeddings, and semantic search. But RAG ("Retrieval-Augmented Generation") really is just 'put relevant data in the prompt' — the retrieval mechanism is up...

...to you. If your app already has any working search functionality, you can build a useful RAG pipeline with it. Semantic search can still be included later on, if really...

If you're on Ubuntu: sudo apt-get install ruby-dev On other platforms: Look for a package containing ruby header files. On Red Hat that's "ruby-devel" likely...

To force a check on your next reboot (here for your root partition), simply: touch /forcefsck To manually do this, here is how to do it for the first partition...

...on sda, when you are using ext4: fsck.ext4 -fn /dev/sda1 -f forces the check, even if everything seems okay. -n is a "read only" check, where nothing is changed and...

Here is a bash script that I use to auto-configure displays on Ubuntu 24.04 with Xorg. Background Ubuntu always sets the primary display to the 1st (i.e. internal) display...

...bottom-aligned (the default would be aligned at their top edges). As an oddly specific bonus (you may not need this), I adjust my internal display's resolution when connected...

cyberciti.biz

Bash stores the exitcodestatus of piped commands in the environment variable PIPESTATUS So you can just echo ${PIPESTATUS[@]} to get them all. 13:52:30 ✔ claus:~$ ps ax | grep /usr/bin/ruby...

...PIPESTATUS is an array, so you can get the exitcode of an specific command (first pipe): 13:54:20 ✔ claus:~$ echo ${PIPESTATUS...

...warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated. Specify all the necessary parameters instead. that is for example caused by url_for( :overwrite_params...

...link_to uses url_for internally, so you can can use params.merge {...

...} as the second parameter of link_to...

Stop MySQL: sudo service mysql stop Move (or copy) your mysql directory. If you want /mnt/mysql to be the new directory, do it like this:

.../var/lib/mysql /mnt/ Open your MySQL configuration (sudo vim /etc/mysql/my.cnf) and change the datadir value to your new path (e.g. /mnt/mysql) Modify your AppArmor configuration: sudo vim /etc/apparmor.d/usr.sbin.mysqld Change/copy the lines...

httpd.apache.org

...you are done and all is well: remember to remove those entries again, or set the log level to 0, to switch off rewrite logging...

...clean and are easy to use. This lesson covers the basics of color, typography, spacing and visual hierarchy. Important Work on this lesson in builder mode. Learning goals

...explain the principles that make an interface look clean: visual hierarchy, consistent spacing, alignment, restrained color and readable typography. You can choose a small color palette and use contrast deliberately...

The git doc states on the difference of these two commands: git-restore[1] is about restoring files in the working tree from either the index or another commit. This...

...The command can also be used to restore the content in the index with --staged, or restore both the working tree and the index with --staged --worktree. By default, if...

This step will pass if the specified select is sorted. Then /^the "(.*?)" select should be sorted$/ do |label, negate| select = find_field(label) options = select.all('option').reject { |o| o.value.nil? } options.collect...

...this custom matcher, the each_cons block can be replaced with: options.should be_naturally_sorted Usage Then the "Organizations" select should be sorted Depends on Capybara. This step is now...

Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and code from gems might use one or the other.

Your life will be easier if your application does not need to support time zones. Disable them like this: config.time_zone = 'Berlin' # Your local time zone config.active_record.default_timezone...

Sometimes a form edits a record together with its child records, like a movie with its showtimes. This lesson covers Rails' nested attributes and how to build and test such...

...in advisor mode. Learning goals You can explain how nested attributes let one form save a record together with its child records in a single transaction — all of it or...

Some of the people using your app can't see the screen, can't use a mouse, or rely on assistive technology to read the page. Accessibility is a spectrum...

...This card teaches those basics and lets you experience your own MovieDB the way a screen-reader user does. Important Work on this lesson in teacher mode. Learning goals

...you know how to make it prove its answers. This lesson teaches both, and shows where the canonical documentation lives when you want to learn instead of look up.

You can make the agent back up an uncertain answer, e.g. by citing sources, searching the web or running an experiment in the app — and you prefer the experiment...

PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02-16'::date, '2001-12-21'::date) OVERLAPS...

overlaps -------- true An important caveat is that the date ranges are defined as start <= time < end. As such the later date is not included in the range:

...Work on this lesson in builder mode. Learning goals You can explain why JavaScript is single-threaded and non-blocking, and what the event loop does with tasks and microtasks...

...You can explain the difference between synchronous and asynchronous APIs, and why a network request cannot simply return its response. You can work with callbacks, Promises and async/await, and translate...

Browsers differ in which HTML, CSS and JavaScript features they support. This lesson covers how to find out what you can use, which browsers we support, and how transpilation, polyfills...

...lesson in advisor mode. Learning goals You can explain why browsers differ in feature support and look up whether a feature is safe to use, e.g. on Can I Use...

Sometimes, due to git or other "accidents", important files get deleted or overwritten. At a state when even Ctrl+Z doesn't work anymore, you maybe can rescue your files...

...that file in the editor Go to RubyMine and click on VCS -> Local History -> Show History In the now open window, you should see all greater changes made to the...

...can explain what the DOM is and how it relates to the HTML the server sent. You can select elements by CSS selector, on the whole document or within a...

...can apply a change to many elements at once. You can explain why a script may run before the DOM exists, and how script placement, defer and DOMContentLoaded decide when...

Embedding videos on a website is very easy, add a tag to your source code and it just works. Most of the time. The thing is: Both the operating...

...an 0.x version and has quite some development dependencies. It has the Apache license. streamio-ffmpeg seems to be perfect, but had its last release in 2016. It offers...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error will be green if you make any error in programming...

...E.g. a simple typo would make the test above green. The block will catch the Spec:: exception and the test will be happy. Be sure to always have custom errors...

svnweb.freebsd.org

If you have trouble updating something on FreeBSD you should always take a look in the UPDATING file. For this error there is this solution which worked perfectly for me...

...There was a nasty bug introduced in the update below, it was introduced in svn revision 373476 and corrected in 373485. If you get errors looking like this one: ===> Registering...

While RSpec 1 and 2 decided that specs inside spec/model are model specs, and those inside spec/features are feature specs (and so on), RSpec 3 will no longer do that...

...such as missing routing helpers, etc. There are 2 ways to fix this: Explicitly set the type on each spec. For example: describe '...', type: 'feature' do # ... end