Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example...
The linked article shows how metapogramming macros can use define_method to make a method that can be overridden with...
PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
If you want to rename a key of a Ruby hash, this could help you out. Just put it into...
This is useful to kill processes like ruby my-script.rb: pkill -f my-script.rb With great power comes great responsibility.
At least Selenium cannot find disabled fields. Unless you find them explicitly: find_field 'This is disabled', disabled: true
...provide a lot of ways to style your scrollbars for now, it might be best to only use them in Browsers that don't support the non-standard scrollbar styling...
...fail with an SQL error due to duplicate index key. You can change Rails' behaviour, by saying class User < ActiveRecord::Base validates_uniqueness_of :name, case_sensitive: false end
...described above. legacy_transforms.rb This file adds a Transform method to the Cucumber "World" which behaves similar to the Cucumber 1 and 2 transformations. This allows cucumber_factory to keep using...
...relative_path_from(fixture_root).sub_ext('').to_s method_name = fixture_name.tr('/', '_') model_class = begin fixture_name.classify.constantize rescue NameError next end define_method(method_name) do |*labels| records = labels.map do |label...
...under test/fixtures/. For each file it derives a helper name from the path (users.yml becomes users) and maps it back to a model class via classify.constantize . It will also silently...
...default: 3.0.1) It is still possible to have newer version of a gem installed beside the default version: gem install strscan Fetching strscan-3.0.3.gem Building native extensions. This could take a...
Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0...
Say you wrap your index view in a form to apply different filters like pagination or a search query. On...
...will happen and will have effect. But what we can observe is that the behaviour of the callback function :my_method does not happen in the test, as if the...
First install Node.js / npm. Then you can install Bower through npm: sudo npm install -g bower
...sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers work hard to eliminate spam and have put in place...
...No staging sandbox No permission system for api keys No authentication mechanism for webhooks besides IP ranges Buggy admin UI SendGrid Pro: Very good deliverability Not quite as expensive
Though the W3C even gives it as an example, no browser actually supports this CSS: img:before { content: "something"; }
...i.e. one transaction can see most of what another is doing), and SERIALIZABLE the best (i.e. transactions are very well isolated). Conversely, READ UNCOMMITTED gives you the best performance, while...
...will be the slowest, due to a lot of locking. This also affects locking behaviour and replication performance. The default level is REPEATABLE READ, and it's the mode you...
Due to network or hardware failures, it can happen that one of your cronjobs will not run at the time...
We had a card that described how to install multiple mysql versions using mysql-sandbox. Nowadays with the wide adoption...
Newer versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version...
...or similar), bundler will install exactly the versions indiciated in the Gemfile.lock. Fix For better consistency, I would advise to make sure you always have PLATFORMS x86_64-linux
For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...
To delete a certificate request run sudo puppet ca destroy $your.full.hostname on your puppetmaster.