DevOps Curriculum

...for Ruby 2.7: Official docs for the Ruby standard library Exercises Create a separate Merge Request in Gitlab for every exercise. Counting words Write a small ruby programm count_words.rb that...

getbootstrap.com

...suggest to regenerate the configuration file with rails generate simple_form:install --bootstrap and merge it with your own customizations instead of only renaming the used classes. You could do...

Let's say you want to merge the properties of two JavaScript objects: let a = { foo: 1, bar: 2 } let b = { bar: 3, baz: 4 } let merged = merge(a, b...

...bar: 3, baz: 4 } Depending on your build, there are several ways to implement merge(). When you have ES6 When you have an ES6 transpiler or don't support IE11...

github.com

...referenced data when it writes locales. If you are using YAML anchors, aliases and merge keys as suggested in this card, you should disable auto-insertion of missing keys (by...

DevOps Curriculum

...Arbeitsergebnisse sollten in einem Git Repository eingecheckt werden. Bitte erstelle für jeden Arbeitsschritt einen Merge Request und lasse diesen von deinem Mentor reviewen. Die Ausgaben des Scripts sollten nach Möglichkeit...

makandra Curriculum

Implement the login form using ActiveType::Object Implement a screen to merge two movies. Flat attributes are copied from the source movie if it is missing on...

...source movie if the target movie has no poster yet. Lists of actors are merged, but actors found in both lists are only kept once. Showtimes are merged as well...

You should avoid using application models in your migrations. But how else could you create records in a migration?

github.com

...version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" yarn-deduplicate will help you with that and merges the two entries above: "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658...

...just copy the folder into your working copy and try a commit without a merge because Subversion will die on you. Work on ./branches/$ticketnumber_shortdesc. If you work on...

...a long story it is useful to sometimes merge the trunk into your branch so there will be less pain later: svn merge https://dev.makandra.de/svn/filepanic/trunk ./branches/$ticketnumber_shortdesc.

By default most exceptions in Rails will render a 500 error page and will create a new issue in your...

...as an environment variable named STAGE: set :whenever_command_environment_variables, ->{ fetch(:default_env).merge(rails_env: fetch(:whenever_environment), stage: fetch(:stage)) } You may now access ENV['STAGE'] in...

makandra dev

...CI pipeline but no CD, you might find yourself frequently waiting for CI (with "merge after pipeline succeeds") just to perform the deployment. The following command waits for the next...

Merging .po-files with Git is painful. There have been attempts of making Git more clever when trying to merge .po-files. I believe however that this is not enough...

...in different branches at the same time. In order to not accidentally produce invalid merges I additionally disable merging for po files altogether, by adding the following .gitattributes file to...

...into .browserslistrc in your project's root directory Look at the default webpacker.yml and merge any changes to your project's webpacker.yml. Add extract_css: true to the default section...

...marked": "0.3.2", "select2": "./vendor/asset-libs/select2", }, "devDependencies": { "webpack-dev-server": "3.x" }, "resolutions": { "jquery": "2.2.4" } } 6. Merge the content of the application.js and application.css to the app/webpack/packs/application.js. You can also import the...

...deeper than 1 level: options = params.merge(:include => { :user => :avatar }) Post.paginate options When inspecting the merged params you will get something like this: { :include=> { "user" => :avatar }, :page => 23 } Here the :user...

docs.gitlab.com

...can use them in your .gitlab-ci.yml in your project. To limit test runs to merge requests and the master branch, you can write this: tests: script: bundle exec rake tests...

- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event...

If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...

makandracards.com

...git pull origin other-branch If you keep rebasing by default, you can get "merge pulls" like this: git pull --no-rebase origin other-branch

You know that you can force absolute URLs throughout a response. Now you want to modify URLs similarly, but only...

end context 'when trying to set a disallowed title' do let(:attributes) { super().merge(title: 'Hello') } # <== it 'will not save' do expect(subject.save).to eq(false) end end

stackoverflow.com

...hash.merge!(hash) do |key, old_value, new_value| # Return something end The block of merge! will be called whenever a key in the argument hash already exists in the base...

...you like (by returning old_value you'd get the behavior of Rails' reverse_merge!, by returning new_value you'd get the behavior of standard merge!). Note that there...

medium.com

...team can still keep up the development pace because developers concentrate on specific components. Merge requests target a specific component. Advantages over a distributed application setup (multiple repositories, multiple applications...

...Everything is still deployed at once. No need to orchestrate branch merges and deploys across N repos. Other resources https://www.airpair.com/ruby-on-rails/posts/ruby-on-rails-the-modular-way https://engineering.gusto.com/building-toward-a-modular-monolith https://railsconf.com/2020/video/vladimir-dementyev-between-monoliths-and-microservices

There are several ways to merge two (or more) PDF files to a single file using the Linux command line. If you're looking for graphical tools to edit or...

...manipulating PDF documents. You may need to install it first (sudo apt install pdftk). Merging multiple files works like this: pdftk one.pdf two.pdf cat output out.pdf Unlike pdfjam, PDFtk should...