Creating a Java keystore

create a keystore file $JAVA_HOME/bin/keytool -genkey -alias tugrulaslan.net -keyalg RSA -keystore keystore.jks -keysize 2048 Generate a certificate signing request (CSR) for an existing Java keystore $JAVA_HOME/bin/keytool -certreq -alias tugrulaslan.net -keysto re keystore.jks -file tugrulaslan.net.csr Import a root or intermediate CA certificate to an existing Java keystore $JAVA_HOME/bin/keytool -import -trustcacerts -alias root -file intermediate.crt -keystore keystore.jks

Bootstrap a sample blog post details/read more page

[code] <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css” integrity=”sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp” crossorigin=”anonymous”> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css” integrity=”sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u” crossorigin=”anonymous”> <style type=”text/css”> body { background: #eee !important; } .page-header{ margin-top: 0 !important; } .panel-body{ padding-top: 0; } .featuredImg{ margin-bottom: 15px; } </style> <!– HTML5 shim and Respond.js for IE8 support

Bubble Sort

Description Given an array the Bubble sort will sort them in the increasing order, it repeatedly compares adjacent items. If the item on the left is greater, it swaps it with the right item. Basically the greater items are shifted towards the right direction. Furthermore, the second iteration is stopped because the last items are

Adapter Design Pattern in Java

Description Adapter Design pattern is listed underneath the Structural patterns. As you understand from the name it is designated to act like an adapter. When you look for this pattern there are different descriptions and examples, however I find the below illustration very clear what the pattern stands for; As you study the illustration we

Mediator Design Patter in Java

Definition The Mediator Pattern falls into the Behavioral Pattern. In simple terms, there is centrally a mediator that handles communication between object in a loosely coupled way, thus objects shall not talk to each other directly. Furthermore, often developers get confused with the Observer pattern, and they seem pretty similar. However, we can break the

Java Object equals, hashCode, Hashing Collections and Hash Code Collision

Introduction In this blog post I’ll be focusing on something very fundamental and assumed as easy in the concept, but fairly the subject requires more focus and better apprehending. Besides that I am quite sure you’ll learn many interesting related to this topic. Object equals and hashCode Methods equals and hashCode methods are shipped with

Fedora DNF Proxy

Fedora’s Package manager DNF requires proxy if you are behind a company network. To enter the details: sudo nano /etc/dnf/dnf.conf add the below line and replace it with your settings and credentials: proxy=http://URL:PORT/ proxy_username=OPTIONAL-IF-NOT-MANDATORY proxy_password=OPTIONAL-IF-NOT-MANDATORY save the file and give it a shot. For troubleshooting you can always tail -f /var/log/dnf.log For my Setup Fedora

Builder Pattern in Java

The Builder pattern eliminates building the complexity of the target object as well as eases the construction by providing such methods that will assemble the object same as building a set of blocks. By implementing the Builder pattern, there won’t be any need of larger constructors, parameter objects or custom types. Furthermore, the Builder pattern

Immutable Objects in Java

Immutability of an object indicates that once an object is constructed with given values, its state and values cannot be altered. In case of any value change must result in new object creation. Out of box Java offers some Immutable objects for instance java.lang.String, java.lang.Integer, java.lang.Float, java.math.BigDecimal. Immutable objects make generally a good use in