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 …

npm –save or –save-dev. Which one to use?

Introduction If you have ever worked in NodeJs, you must have install one or two packages through “npm install <package>” command.  By running this command, the nodeJs will install this package on your working directory, under node_modules. To save this packages as your dependencies, under package.json, you have two choices: –save-dev –save …

SQL Queries to IIS Logs

Overview There is always a case that you want to integrated IIS Logs into your project. You can relay on third party services/ interface. However, the best approach is to have one application where you can integrate the logic of IIS log reading. Since 2009, Microsoft has introduced a tool …