Saturday, December 12, 2020

State Machine implementation for Spring Boot Project

Well I do not write a lot about it. You have plenty of resources to read about it. The behavior of state machines can be observed in many devices in modern society that perform a predetermined sequence of actions depending on a sequence of events with which they are presented. Here is my take on State machine implemenation for Spring Boot Project

How to Dockerize your HashiCorp Vault set up with nginx reverse proxy

If you have Dockerized HashiCorp Vault, you might need to access it over the internet or from outside your internal network. The most common standard is to run your Vault set up behind the reverse proxy. Then of course you have to configure HTTPS connection. More Info from my medium blog post.

How to Dockerize your Keycloak set up with nginx reverse proxy

If you have Dockerized Keycloak, you might need to access it over the internet or from outside your internal network. The most common standard is to run your Keycloak set up behind the reverse proxy. Then of course you have to configure HTTPS connection. More Info from my medium blog post.

Wednesday, March 12, 2014

MySQL Substring with Last index

Sometimes you may need to use substring in your queries to extract some parts of the values, specially from last index of the value. To achieve that you can use substring_index and reverse functions together.

Monday, February 10, 2014

Java keystore - Copy key from one keystore to another

One day you may need to isolate some of your key(s) to different keystore. Here is the command for it,

keytool -importkeystore -srckeystore mystore.jck -destkeystore myotherstore.jks -srcstoretype jceks -deststoretype jks -srcstorepass mystorepass -deststorepass myotherstorepass -srcalias myserverkey -destalias myotherserverkey -srckeypass mykeypass -destkeypass myotherkeypass

Here is my Scenario - Why I needed to do it? to be added..... :-)

Thursday, January 02, 2014

How to Create MicroSIM from standard SIM

As name says MicroSIM is smaller than standard sim, but chip is exactly same size in both cases. MicroSIM is 15 mm in height and 12 mm in width. So we can cut plastic area in order make it. Please be careful not to damage chip while you cut it.

Please use below pdf document for the MicroSIM template.

MicroSIM Template

Good luck...

Friday, November 08, 2013

Example Spring MVC, JPA, Hibernate Project with Maven

Here is the github link for sample Spring MVC, JPA, Hibernate Project with Maven. You can download and build your project on top of it.

sample-spring-mvc-jpa

Happy Hacking..

Thursday, October 03, 2013

Write Text file to network drive


First you have to download CIFS Client library from http://jcifs.samba.org/

if you use domain then you have to use user variable like below,
    String user = "domain;user:password";

else use below code,
    String user = "user:password";

rest of the code should be like below,
    NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(user);
    String path = "smb://server/D/MyLocation/data.txt";
    SmbFile sFile = new SmbFile(path, auth);
    SmbFileOutputStream sfos = new SmbFileOutputStream(sFile);
    sfos.write("Test".getBytes());

There you go, data.txt should be there in your locatoin :-)

Sunday, August 25, 2013

Change/ Modify Image meta data in Linux


Assume you need to change Image meta data like Date Taken etc. Believe me you may need to change something like this in some cases ;-)
Step 1.) sudo apt-get install libimage-exiftool-perl
Step 2.) exiftool -AllDates='2013:08:08 15:35:33' -overwrite_original image.jpg
Hope this tip would help you in one day :-)

State Machine implementation for Spring Boot Project

Well I do not write a lot about it. You have plenty of resources to read about it. The behavior of state machines can be observed in many d...