Docker commands

Create docker: > docker run -d -P –name jenkins-master -v /Users/codebased/docker:/jenkins-data jenkins To start/restart/kill the existing docker by name > docker start/restart/kill jenkins-master ========================================== It will get you a list of volumes that your containers are referring to. > docker volume list If you want to access the docker file …

Android – Share code between multiple applications

Physical Path way It may work well when you have a common drive location among code contributors. If you are only the one who maintain this library for a  different projects then this can your favourite option. Open your app settings.gradle and add these lines: include ‘:app’ include ‘:networkservices’ include ‘:common’ project (‘:networkservices’).projectDir …

Node.JS: Error Cannot find module [SOLVED]

Even though I have installed my npm package globally, I receive the following error : Error: Cannot find module ‘color’ at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at repl:1:2 at REPLServer.self.eval (repl.js:110:21) at Interface. (repl.js:239:12) at Interface.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) I did …

Setting HttpContext Response using HttpResponseMessage or Request.CreateResponse in WebApi2

Background In my recent Continuous Improvement (CI) initiative I have been introducing few ActionFilters for the WebApi Controllers. These action filters validates the request by using payload or the current user token against some business logics. If the request is not fulfilling business requirements then the filter should stop further processing and send …