...is out of range (Redis::CommandError) This is because Redis defaults to at most 16 databases (0 to 15) and running tests in parallel might exceed that (your tests might...

...run on databases 1..n or 2..(n+1)). You can increase that limit: Get number of CPUs of your machine. nproc --all Open up Redis configuration file.

developer.mozilla.org

...but must also render nicely for browsers that don't support it (mostly Safari <17.5). Step 1: Put some s into your HTML First, place explicit line breaks that should...

getbootstrap.com

...look for another clockpicker or overwrite the styles by using bootstrap variables. Upgrade Phase 1 First you should include the new version into your project and replace the old imports...

...say you have a database schema where an Employee belongs_to :department: +-----------------+ | Employee | +------------+ |-----------------| n 1 | Department | | email |-------------------|------------+ | department_id | | name | +-----------------+ +------------+ Because of performance reason you decide to cache the department...

...s name into a new column Employee#department_name: +-----------------+ | Employee | +------------+ |-----------------| n 1 | Department | | email |-------------------|------------+ | department_id | | name | | department_name | +------------+ +-----------------+ You add the column like this: ALTER TABLE employees ADD COLUMN...

makandra dev

...into pairs of two, you can use the Rails ActiveSupport method in_groups_of: >> [1, 2, 3, 4].in_groups_of(2) => [[1, 2], [3, 4]]

...in_groups_of(2) => [[1, 2], [3, 4], [5, nil]] >> [1, 2, 3, 4, 5].in_groups_of(2, 'abc') => [[1, 2], [3, 4], [5, 'abc']]

...with "INFO" in green: tail -f /path/to/log | sed --unbuffered -e 's/\(.*INFO.*\)/\o033[32m\1\o033[39m/' -e 's/\(.*FATAL.*\)/\o033[31m\1\o033[39m/' Here are the most common...

...by setting the left and right margins to auto, for example: // SASS $container_width: 100px .container width: $container_width margin: 0 auto However, this won’t work on an absolutely...

...positioned element. But there is a solution: // SASS $container_width: 100px .container width: $container_width position: absolute left: 50% margin-left: floor($container_width...

User.singleton_class.ancestors # => [# , B::ClassMethods, A, # , # , Class, Module, Object, Kernel, BasicObject] User.singleton_class.class # => Class User.singleton_class.ancestors[1].class # => Module Note that # is the singleton class and as we have seen the parent...

...t be able to call gsub with a block and match reference variables like $1. They will be nil inside the block where you define replacements (as you already know...

...Here is a fix to SafeBuffer#gsub. Note that it will only fix the $1 behavior, not give you a safe string in the end (see below). Example

...f mysql5.1 -d "default parameter with utf8" --aws-credential-file ./aws-credential.txt --region eu-west-1 The output should look like this: DBPARAMETERGROUP utf8 mysql5.1 default with utf8 Now change the...

...parameter of the new parameter group /home/foobar/Downloads/RDSCli-1.4.007/bin/rds-modify-db-parameter-group utf8 --region eu-west-1 --aws-credential-file .aws-credential.txt \ --parameters="name=character_set_server, value=utf8, method=immediate" \ --parameters="name=character_set_filesystem...

...database_size('some-database')); Example SELECT pg_size_pretty(pg_database_size('cards_p')); ---------------- 13 GB (1 row) SELECT pg_database_size('cards_p'); pg_database_size ------------------ 13524832927

Consider the following git diff output. diff --git a/file1.rb b/file1.rb index 806ca88..36d536b 100644 --- a/file1.rb +++ b/file1.rb @@ -1,7 +1,5 @@ -# Here is a useless comment. -# It will be removed...

+ def bar # ... end end diff --git a/file2.rb b/file2.rb index 550e1c6..600f4e3 100644 --- a/file2.rb +++ b/file2.rb @@ -1,6 +1,5 @@ -# Here is another useless comment. class File2

...reason) not rendered in controller specs. If you need it to happen, use: RSpec 1 (Rails 2): integrate_views RSpec 2 (Rails 3): render_views Note that you can't...

Here is one pretty easy solution to get what you want: Step 1 Let your input became a text area with one row. f.text_area(:name, rows: 1...

Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2 gem 'capybara', '< 2' # capybara 2+ requires Rails 3 gem 'mime-types...

...dependeny of capybara gem 'nokogiri', '< 1.6' # dependency of capybara gem 'rubyzip', '< 1' # dependency of selenium-webdriver, rubyzip 1+ requires Ruby 1.9 gem 'cucumber_factory' gem 'database_cleaner', '< 1'

...threads, that handle the incoming requests. Example: A Puma server with 2 workers and 1 thread each can handle 2 request in parallel. A third request has to wait until...

...but once one thread is blocked, another can continue. Example: A Puma server with 1 worker and 2 threads can handle 2 requests. A third request has to wait until...

...rd|th) (role|showtime) fields?\z/ ".nested-fields .nested-fields--form:nth-of-type(#{$1})" end end end World(HtmlSelectorsHelpers) nth-of-type matches by counting the actual HTML-tag...

Scenario: Example scenario Given ... When I fill in "Character" with "Kaiser" within the 1st role fields And I select "Moon" from "Movie" within the 1st role fields

...example, if you need to support ancient browsers: { "presets": [ ["env", { "modules": false, "targets": { "browsers": [ "> 1%", "Firefox >= 52", // old ESR "IE 11" ], "uglify": true }, "useBuiltIns": true }] ] } UglifyJS also has compatibility settings...

...always agree with. We recommend replacing this with makandra-rubocop or disabling the inspection. 1. Adding the gem to an existing code base Follow the instructions in the README. Most...

when 'the homepage' root_path when /^the list of (.*?)$/ models_prose = $1 route = "#{model_prose_to_route_segment(models_prose)}_path" send(route) when /^the (page|form...

...for the (.*?) above$/ action_prose, model_prose = $1, $2 route = "#{action_prose == 'form' ? 'edit_' : ''}#{model_prose_to_route_segment(model_prose)}_path" model = model_prose_to_class(model_prose)

...equality matchers) like this: beforeEach -> jasmine.addMatchers toEqual123Array: (util, customEqualityTesters) -> compare: (actual) pass: util.equals(actual, [1, 2, 3], customEqualityTesters) Note how the compare method is passed two arguments util and customEqualityTesters...

Connect to your memcached host. (AWS elasticache is memcached) telnet foohost23.cs2631.0001.euw1.cache.amazonaws.com 11211 Once you're connected, find out which 'slabs' exist within the cache: stats items STAT items:1:number...

...STAT items:1:age 5166393 STAT items:1:evicted 0 STAT items:1:evicted_nonzero 0 STAT items:1:evicted_time 0 STAT items:1:outofmemory 0

...you insert a record "by hand". This will cause an error: record = Record.create! record.id # => 100, next automatic id will be 101 Record.create!(id: record.id + 1) # okay, but next automatic id...

...will still be 101 Record.create! # will cause an SQL error 'duplicate key value violates unique constraint "records_pkey"' Workaround In tests, one workaround would be to simply initialize all sequences...

...find out about #fill but it is not really what you are looking for. [1] For arrays of unknown size that you want to grow or shrink to a fixed...

...sized << fill_with while sized.size < expected_size sized end end Use it like this: >> [1, 2, 3].in_size(5) => [1, 2, 3, nil, nil]