...instance use only 20GB disk space but the disk file on the server has 100GB (or even more). To resize the disk file do the following: Check storage on the...

vm $ df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 99G 19G 75G 21% / udev 2.0G 12K 2.0G 1% /dev tmpfs 396M 236K 396M 1% /run...

stackoverflow.com

...following snippet: echo -n "md5"; echo -n "${PG_PASSWORD}${PG_USERNAME}" | md5sum | awk '{print $1...

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

...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

...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...

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 HTTP code 422 Unprocessable Entity instead of the default 200 OK. This is (1) to be a good HTTP citizen and (2) to allow frontend code like detect a...

...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...

...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...

...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...

makandra Curriculum

Add a reminder to your calendar: Repeat the learnings of the last 10 curriculum cards every other monday Read the article "Parting advice from an older Software Engineer...

...Try to memorize the key takeaways of 1-5 on the list. Watch Dominik's talk "Test-Led Development" (in our library) and try to apply his technique in the...

...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...

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'

...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...

Eine ASG skaliert abhängig von der CPU Auslastung, skaliert aber immer maximal 1 Instanz dazu und das nur alle 5 Minuten. Jeden Tag um 20 Uhr steigt der...

...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...

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)

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

...webcam in PulseAudio use the following one-liners: # Connected cards $ pactl list short cards 1 alsa_card.pci-0000_00_1f.3 module-alsa-card.c 5 alsa_card.usb-Lenovo_ThinkPad_Thunderbolt_4_Dock...