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.
Oct 13, 2017
https://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods covers very basic and interesting stuff.
mrinmoy
Oct 4, 2017
gitlab does triple dot for compare instead of double dot
mrinmoy
Sep 27, 2017
Sometimes we may need to create a new github/bitbucket account for a new client project. Because we've already linked out laptop's SSH key to our original account, we can't link it again to this new account. In such cases, instead of using tools to switch ssh keys, you can generate a keypair just for this project and set an environment variable
GIT_SSH_COMMAND='ssh -i new_ssh_keys_dir/id_rsa'
and run git commands like usual. Bonus tip: Use direnv to automatically load this environment variable when navigating to the project directory.emil
Sep 27, 2017
Rails encrypted secrets https://www.engineyard.com/blog/encrypted-rails-secrets-on-rails-5.1
manu
Sep 26, 2017
MySQL does not support transactional ddl. https://dev.mysql.com/doc/refman/5.7/en/cannot-roll-back.html
mrinmoy
Sep 22, 2017
Omniauth setup phase - request time modification of strategy https://github.com/omniauth/omniauth/wiki/setup-phase
manu
Aug 29, 2017
You can create a multiline regex in Elixir using r""" for example:
```
assert yml_file_content =
~r"""
foo:
environment:
- VIRTUAL_HOST=[a-z]{10}.127.0.0.1.xip.io
bar:
environment:
VIRTUAL_HOST: [a-z]{10}.127.0.0.1.xip.io
"""
```
```
assert yml_file_content =
~r"""
foo:
environment:
- VIRTUAL_HOST=[a-z]{10}.127.0.0.1.xip.io
bar:
environment:
VIRTUAL_HOST: [a-z]{10}.127.0.0.1.xip.io
"""
```
emil
Aug 23, 2017
The best way to parse time is to use Time.zone.parse (which will use the time zone specified in config.time_zone) instead of just Time.parse (which will use the computer’s time zone) courtesy: https://www.varvet.com/blog/working-with-time-zones-in-ruby-on-rails/
manu
Showing 72 to 74 of 78 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