The Dev Haus

developer's diary

Search and Replace Bash

Search/replace string recursively in Linux grep -rnw ./*.* -e "string-to-search" Replace all occurrences bash sed -i 's/FROM/WITH/g' filenamePattern For e.g. sed -i 's/ash@gmail.com/someone@outloo.com/g' *.txt

How to use Wiremock with HTTPS

Introduction Wiremock is an awesome HTTP stubbing library which can be used to mock end points. It is super simple and can be used as a standalone server. The beauty is that it can be used to stub SSL endpoints making it very versatile and easier to use. Wiremock although ships with default keystore but it is issues to the creator. If you really want a full fledged SSL then it is a good idea to create the new keystore and use it.

Init Java Groovy Project Thru Gradle

Initialize a Java or Groovy project using gradle Gradle does not have full fledged support for generating skeleton project structure (maven archetype). Although there is some support available for some default java/scala/groovy and related libraries. The gradle init plugin supports various basic formats for generating the project structure. For example: Here’s an example: # Create Java application directory structure gradle init --type java-application # This will generate basic project structure for a java command line application project with the standard defaults and will use JUnit as test framework.