Profile cover photo
Profile photo
Andrii Polunin
40 followers
40 followers
About
Andrii's posts

Post has attachment
Clone a Git Repository Into a Specific Folder
Let's take a look at a sample git repository URL: https://github.com/apolunin/java8-impatient It can be cloned via the following command: git clone https://github.com/apolunin/java8-impatient The contents of the repository will be put in the 'java8-impatien...

Post has attachment
Change File Type in Vim
Recently I had to write a few lines of code in assembly language. Vim and GAS were chosen as suitable tools to use. I downloaded vim-gas plugin, installed it using vim-plug (Vim plugin manager that I prefer) and started coding. Unfortunately Vim detected fi...

Post has attachment
Convert InputStream to String in Java
Sometimes in Java world it is necessary to convert an InputStream to a String for further processing. There are several ways to do it, but here is a fantastic trick I recently discovered in this article : final String text = new Scanner(inputStream).useDeli...

Post has attachment
Create a GUID in Java
Some software development tasks need a way to generate unique identifiers. I saw several homegrown solutions, but Java 5 makes the process a breeze. It contains class UUID which can generate type 4 (pseudo randomly generated) unique identifiers. Here is a s...

Post has attachment
Change Editor for Git Commit Messages
Git is a very powerful tool especially when used from a console. Obviously committing changes is a pretty common task which includes editing commit messages. If a message is short it is easy to specify it via -m option: $ git commit -m "my commit message" B...

Post has attachment
Rename a Remote Branch in Git
In the previous post I described how to rename a local branch in Git. Now let's take a look how to rename a remote branch. The process is a bit more complicated than with a local one and consists of the following steps: Create a new local auxiliary branch w...

Post has attachment
Rename a Local Branch in Git
From time to time I have typos crept in the names of Git branches I create. Certainly it is possible to delete a branch and create a new one with corrected name. However Git allows for combining two steps into a single one. Here is a simple way to rename a ...

Post has attachment
How to Avoid Null Checks in Java
I suppose every Java developer wrote checks similar to the following many times: if (obj != null) {
// ...
obj.doSomething();
// ...
} Sometimes such code seems reasonable and its usage can be justified. However more often than not there are bet...

Post has attachment
Create Web Application with Maven (Tomcat, WAR File)
This post is a step-by-step tutorial which shows how to create a simple Java webapp project using Maven - a popular Java build tool. The project will be packaged into a WAR file and deployed to a local Tomcat web server. The following technologies will be u...

Post has attachment
Tomcat Administrator Login and Password
Tomcat web server has several web applications bundled with it which supply nice GUI to perform administrative tasks. In order to access them you need to authenticate with login and password. Where to get them from? Here is the solution which was tested wit...
Wait while more posts are being loaded