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.
Mar 23, 2018
active support has an unordered map like structure https://apidock.com/rails/ActiveSupport/OrderedHash, but it is actually called ordered hash (shrug)
mrinmoy
Mar 22, 2018
Multiple ways to read files in golang explained - http://kgrz.io/reading-files-in-go-an-overview.html
manu
Mar 21, 2018
When using docker-compose and when in doubt that containers are getting cached, pass
--build
option. Works like charmYuva
Co-founder
Mar 18, 2018
chrome://net-internals
mrinmoy
Mar 17, 2018
use chrome(v65 and above) local overrides to modify a webpage's assets and store on your local which will be loaded everytime you open the website - https://www.youtube.com/watch?v=UOn0b5kn3jk
amit
Mar 15, 2018
If you have a dimple, it's a muscle atrophy - basically your muscle doesn't work
emil
Mar 15, 2018
Use AbortController to cancel the promise.
/code
const controller = new AbortController();
const signal = controller.signal;
// pass this signal as option in your fetch request
fetch(url, {signal}).then(...).catch(...)
// now you can reject the above promise by calling abort like this
signal.abort()
//promise will get rejected with error "AbortError"
/code
const controller = new AbortController();
const signal = controller.signal;
// pass this signal as option in your fetch request
fetch(url, {signal}).then(...).catch(...)
// now you can reject the above promise by calling abort like this
signal.abort()
//promise will get rejected with error "AbortError"
harshwardhan
Mar 13, 2018
preloading data for custom sql,
profiles = Profile.find_by_sql(sql_query)
ActiveRecord::Associations::Preloader.new.preload(profiles, :user)
Some more stuff here http://cha1tanya.com/2013/10/26/preload-associations-with-find-by-sql.html
profiles = Profile.find_by_sql(sql_query)
ActiveRecord::Associations::Preloader.new.preload(profiles, :user)
Some more stuff here http://cha1tanya.com/2013/10/26/preload-associations-with-find-by-sql.html
mrinmoy
Mar 13, 2018
rendering templates outside of controller "SomeController.render :index, formats: :csv, locals: { users: users }"
mrinmoy
Mar 5, 2018
We can specify integrity and crossorigin on link and script tags. More here https://hacks.mozilla.org/2015/09/subresource-integrity-in-firefox-43/
Yuva
Co-founder
Showing 66 to 68 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