development

consul-vault: Fun with CLI

consul-vaulttools have a graphical and command line interfaces. I found CLI faster for development. So I’m sharing how to setup and use consul. Steps Set consul and vault path. export VAULT_ADDR=https://xxxx export CONSUL_HTTP_ADDR=xxxx Login to vault vault login -method=github -path=github Install consul-template. Run the template. consul-template -vault-renew-token=false -template “./config.tmpl:/tmp/out.json” -log-level debug You can also access […]

Read more
development

Codility: Maxed Counters Problem

Problem You are given N counters, initially set to 0, and you have two possible operations on them: > – _increase(X)_ − counter X is increased by 1, > – _max counter_ − all counters are set to the maximum value of any counter. A non-empty array A of M integers is given. This array […]

Read more
development

Assertion failed: (!STR_EMBED_P(shared)), function str_new_frozen, file string.c, line 1075.

Solution If you workflow has Docker container, please stop the containers. Check with $docker ps and verify that all containers are in exited state. Set the right Ruby version. Find out from the project repo Makefile, build scripts. Update the bundler to same version as of Ruby. Reference https://bugs.ruby-lang.org/issues/11946 https://github.com/rbenv/rbenv https://philna.sh/blog/2017/03/22/always-install-bundler-alongside-ruby-with-rbenv/

Read more