Here goes my first Angular post - yeeey. Well, it’s not super exciting, but practical and specific… Topic - generic: present how to update a field’s value in a reactive form field, once a value in another field is given. Topic - concrete: there is a personal bookmarks section on https://www.bookmarks.dev; when you add a new bookmark and you fill in the location field with an URL, the title field is being automatically filled in by scraping the page for its title. Of course later you have the possibility to change it.

In the end I present the struggle that led me to the solution.

Octocat Source code for bookmarks.dev is available on Github - frontend and backend.

Continue Reading ...

This post shows how to deploy a Java EE application on a WildFly or JBoss EAP 7 via the WildFly Maven Plugin1. You can use this plugin to deploy, undeploy or run your application. The post has two parts:

  • deploy application on local server
  • deploy application on remote server via https
Continue Reading ...

This is not the first time I need to install and configure a MySql Community Server on a fresh system with Ubuntu (16.04) running on it. So instead next time to have to google for the individual steps again, I decided to write a post. Find out also how to tweak the Server configuration.

Continue Reading ...

This post describes how to develop a Java EE REST service, usually part of a REST API backend, that will provide information about the current version of the implementation plus the git sha-1 number1. This can be very useful in continuous delivery2 scenarios or for the operations team, where they make a smoke test after deployment to “humanly see” if the API is “alive”, plus one gets which version/commit is currently deployed. The post implies you are also using Maven3 to build your project

So when making a GET REST call against the service:

GET http://localhost:8080/some-root-context/version

I would expect something like the following

{
   "version": "1.2.0",
   "gitSha1": "8f0b7f7e1fc0d"
}

where the version attribute displays the version of the project from the pom.xml4 file and the gitSha1 attribute contains the first, let’s say 13 characters of the SHA-1 calculated from the git commit that corresponds to this deployment.

Generally, eight to ten characters are more than enough to be unique within a project, but I choose thirteen just to be sure :)

You can then use the gitSha1 value with the git show command to show the corresponding commit:

$ git show 8f0b7f7
commit 8f0b7f7e1fc0dcde3ccc0a9418f37a698dabb3b7
Merge: df736ab 3ebcbdb
Author: Adrian Matei <ama@codepedia.org>
Date:   Sat Dec 3 09:30:41 2016 +0100

    Merge branch 'master' of https://github.com/CodepediaOrg/codepediaorg.github.io

Continue Reading ...

The dev-bookmarks are persisted in a MongoDB Server. Very often I find myself in the situation, where I need to modify or look for something in the mongo database. Experience has taught me that interacting with a system via shell commands helps me understand it better, and sort of brings me closer to it. Ok, so how to find the right mongo shell command? Well, I google for it of course, and most likely I am pointed to the right entry in the Mongo manual. In this post I try to consolidate the commands I usually use, so that I have only one codingmark to look for…

Octocat Source code for bookmarks.dev is available on Github - frontend and backend.

Continue Reading ...