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.
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
Aug 22, 2017
capistrano3-puma has become so advanced that it can now generate nginx configuration https://github.com/seuros/capistrano-puma#nginx This is so helpful!
Yuva
Co-founder
Aug 22, 2017
from ps man pages, if you want to list pids of particular process just use
ps -C -o pid=
. Damn handy when it comes to looping and killing processesYuva
Co-founder
Aug 19, 2017
in js the default sort order is according to string Unicode code points, source https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/sort (shrug)
Mrinmoy
Aug 18, 2017
Rails
prepend_before_action
to chain before action callbacks. Manu
Aug 16, 2017
ActiveSupport::Autoload helps to require the file and loads only when needed
Akshay
Showing 75 to 77 of 80 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