There are many blog posts on encrypting backups, but none works for local drives. #How to Encrypt the external backup...
Connect to your IMAP server. If you have SSL enabled: openssl s_client -connect your-server:993 if your server...
...to determine if a service can be restarted or not. To manipulate the default behaviour, the package policy-rcd-declarative-allow-all or policy-rcd-declarative-deny-all can be...
Sometimes, due to git or other "accidents", important files get deleted or overwritten. At a state when even Ctrl+Z...
It is just not worth the risk and you can always do better. Alternatives Instead, you should take a different approach. Here are several alternatives.
Microsoft provides virtual machines for different Internet Explorer versions. The images are available for various virtualization solutions, including VirtualBox...
...many includes), this query may take several seconds to complete. If you encounter this behavior, a solution is to calculate the total count yourself and pass it to the pagination...
Due to the way we setup Jasmine tests in our projects, you may run into various errors when Jasmine boots...
Sometimes the Rails helper #distance_of_time_in_words is using too much magic. When you need a time difference...
Full-text search can reach its limits in terms of flexibility and performance. In such cases, trigram indexes (pg_trgm...
In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830). Before Rails 8: The command runs all migrations in the folder...
Attached you can find an example ~/.ssh/config file which makes working with SSH more pleasant. It contains several tweaks:
available for button, fieldset, input, select, textarea, command, keygen, optgroup, option Browser specific behavior: IE 11: text inputs that are descendants of a disabled fieldset appear disabled but the...
There are several tools for DNS debugging which offer you more or less information. Most of the time the more...
...DSL to define new routes. A big drawback however is that your code often becomes much harder to read. Another con of DSLs is that they tend to be so...
...email => 'foo@bar.de' } book.tobias_kraze # => { :phone => '67890', :email => 'bam@baz.de' } Now change Addressbook so each contact becomes their own Contact instance which responds to #phone and #email: book.henning_koch # => Contact<#....> book.henning_koch.phone...
Why do we migrate? Due to a change in licensing, we cannot provide Elasticsearch versions >= 8.0. Version 7.17.x will...
This still relies on params[:id] existing, so your code should reflect that: # Better User.find(params.expect(:id)) # Or User.find(params.require(:id)) Avoiding issues with extra parameters Rails logs extra...
...should still use permit (or expect) to receive Strong Parameters, but strip extra parameters. # Better (option 1) redirect_to users_path(params.slice(:query, :encoding).permit(:query, :encoding)) # Better (option...
...instead of using a more costing feature spec. This is especially useful because they become quite convenient when used with Capybara::Node::Finders and Capybara::RSpecMatchers. This allows to wirte...
...view might be too isolated, since view-specs will mock a lot of rails behavior and render the view independent from the controller-logic. Therefore it will be more applicable...
ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To freeze the current time, use...
Learn to treat files as an ActiveRecord attribute type, like :string or :integer Research Look at the README for...
If you want to enforce soft tabs (spaces instead of tabstops) in Vim put this into your ~/.vimrc (Linux) or...
Rails doesn't know which host it is running on. For generating links, it strips the hostname off the request...
require 'open-uri' File.open('/target/path/to/downloaded.file', "wb") do |file| file.write open('http://example.com/your.file').read end Basic Authentication
Mark window as "demands attention" Install wmctrl through your package manager, i.e. sudo apt-get install wmctrl Download the attached...