Fueling Curiosity, One Insight at a Time
At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.
Nov 2, 2018
Rspec has argument matchers
any_args
for matching any number of args at any point in an arg list and anything
for matching anything and everything.akshay
Oct 31, 2018
use
flex: 1
on the child of flexbox element to expand the child to 100% width of the parent https://jsbin.com/dadidujubo/1revath
Oct 26, 2018
Capybara defaults to requiring an href attribute exist when finding links. To handle such cases we can pass
href: nil
as an option thus enabling to find it.akshay
Oct 12, 2018
Rails has an ActiveSupport::Notifications module which is a part of its core instrumentation API. This API allows users to define hooks on events. With the ActiveSupport::Notifications you can instrument an event by simply calling
instrument
with a name, payload and a block. The notification will be sent after the block returns. Now all you need is to define subscribe
method which consumes the event based on event name and you can define your on callback code here, sort of like a Pub/sub pattern.akshay
Oct 10, 2018
related to
GIT_SSH_COMMAND
(http://codemancers.littil.io/?q=GIT_SSH_COMMAND) if you are using hub + multiple account. you can use HUB_CONFIG=~/.config/hub-work
for setting config for work account. source: https://github.com/github/hub/issues/1300#issuecomment-318872894revath
Oct 4, 2018
you can pass options.args << ‘--headless’ to firefox newer versions, no need for headless gem
options = Selenium::WebDriver::Firefox::Options.new
options.args << ‘--headless’
Capybara::Selenium::Driver.new(app,browser: :firefox, options: options)
options = Selenium::WebDriver::Firefox::Options.new
options.args << ‘--headless’
Capybara::Selenium::Driver.new(app,browser: :firefox, options: options)
goromlagche
Sep 27, 2018
To remove unwanted hex packages from
mix.lock
file, use mix deps.unlock --unused
commandiffyuva
Sep 24, 2018
about https://stedolan.github.io/jq/ useful while tailing json logs, e.g tail -f /var/log/app.log | jq -r
goromlagche
Sep 23, 2018
You can switch between k8s contexts using the docker toolbar menu in OSX.
emil
Sep 19, 2018
use
Application.get_env(:your_app,:env)
in prod instead of Mix.env
. when you deploying to prod. https://gitlab.com/codemancers/diffity-vue/commit/076c54a418d988208627f61f206176744aefca30revath
Showing 57 to 59 of 76 results
Ready to Build Something Amazing?
Codemancers can bring your vision to life and help you achieve your goals
- Address
2nd Floor, Zee Plaza,
No. 1678, 27th Main Rd,
Sector 2, HSR Layout,
Bengaluru, Karnataka 560102 - Contact
hello@codemancers.com
+91-9731601276