How to use variable with $scope in angular

Recently I faced an issue where I needed to use variables coming from json response with $scope and after lots of hit-trial and searching came across a solution.

Continue reading

Advertisements

Avoiding pitfalls running Mongo 3.2 in Docker on OSX

Convivial Coding

Quick post after smashing my head off the desk for 5 hours trying to understand YTF I couldn’t get Mongo 3.2 running in a Docker container on my Mac.  Hopefully this post spares others the elastoplasts 🙂

logo-gray-1024x512-993867aa92

Pitfall #1 – Mongo cannot write data to the host OSX machine

There are three factors that cause this issue:

  1. A lot of mongo/docker docs tell you to mount a local volume
  2. By default docker-machine uses the virtualbox driver to create a local VM
  3. Mongo uses mmap to turbo-charge access to files on disk

These facts led me (by way of this issue) to the fact that there’s been an ancient known issue on VirtualBox that basically says docker ain’t going to be able to read/write files with mmap.

So it’s pointless trying to tell mongo, via docker, to mount a local data volume, as the above bug means mongo isn’t going to be able…

View original post 502 more words

12 Most Influential Books Every Software Engineer Needs to Read

The Curious Programmer

This is a question that I get a lot, especially from co-workers or friends that are just beginning their journey as a software craftsman.

What book should I read to become a better developer? Do I need to read books?

I think it’s a great question, and it is one that I asked many of my mentors as I was becoming a software engineer. The problem was that many people suggested different books on different topics. All the books they suggested were great in their own right, but no one was able to give me a list that would be the ESSENTIAL books, the MUST READS, that any engineer with hopes of being great should most certainly read.

Well, I’ve learned a lot from my mentors and realized that I still had a lot to learn with the many different books that were suggested to me. I decided to develop a routine…

View original post 2,144 more words

Tags input with autocomplete in AngularJS

Recently I needed to use tag input just like Gmail uses to input recipient’s email addresses in compose email dialog box. As I was using AngularJS in my project so the solution must be compatible with it. I searched a lot about it and then finally found a good autocomplete lib on Github but couldn’t find autocomplete and tags input combo. So i decied to develop tags input onmy own with found autocomplete solution.

Continue reading