If you want run your application as a systemd service, using systemctl, you can do that easily by creating service file. As example, we are going to run Python Flask to show basic info about OS. Project structure: Let’s create file monitor_app.py: from flask import Flask, render_template import os app = Flask(__name__) @app.route(‘/’) def index(): return […]

Generate class during runtime with Javassist
Java + Javassist = Simple bytecode manipulation Few days ago, I was trying to look for inspiration on internet about that how to generate java class during runtime and I was surprised by that I was not able to find any example. So here we go! It is really simple. You can get this code […]

Custom Java annotations – Quick example of easy and powerful Java function
Development of custom Java annotations is really quick and usage of annotations is really awesome and it provides very easy way how to offer customization. In this short post we are going to create a simple application with custom annotation for FIELD type. I’d like to show you only basic concept and I believe that […]
Groovy script in post function #2 Add comment to issue via script
In this post I’ll describe a very easy script how to add comment to issue during post function with ScriptRunner. It would be useful if you will need to calculate values from fields, or add comment to keep any informations in history or in my case, just use it to know what happens and what are […]
IntelliJ Platform Plugin development example – #1 Generate class from template
This if first blog post about IntelliJ Plugin development, which will cover development of custom basic plugin for IntelliJ which will add new action to right click (in Project view) menu, define new class and generate it from template. Idea of these blog posts is that provide example which cover common problems like custom dialogs, action […]
IntelliJ IDEA – Import plugin module from existing source
If you are trying to import module, which contains IntelliJ Platform Plugin, you would like to have it imported like plugin. How to fix imported plugin module: Open Module settings Import module Apply changes Open .iml file for your module Look for <module type=”JAVA_MODULE” version=”4″> Change it to <module type=”PLUGIN_MODULE” version=”4″> I was not able to find […]

How to disable weak cipher suites in Java
If you want to set up used cipher suites in your Java application, you can do it by property jdk.tls.disabledAlgorithms for TLS ciphers and jdk.certpath.disabledAlgorithms for SSL certificates, in security policy file java.security. This file is located in {APP_HOME}/jre/lib/security folder. If you want to set which TLS will be used, you can do it in the same […]

Docker – Useful commands
Here are few useful commands for Docker which I am using. So I summarized them here: How to get another part of docker version? You can get everything from docker version result which looks like this: Client: Version: 1.12.1 API version: 1.24 Go version: go1.7 Git commit: 23cf638 Built: […]

Hibernate – CASE WHEN in HQL – ParameterNode cannot be cast to SelectExpression
If you want to use SQL USE … WHEN … ELSE expression in HQL (Hibernate Query Language), you may faced to this: java.lang.ClassCastException: org.hibernate.hql.internal.ast.tree.ParameterNode cannot be cast to org.hibernate.hql.internal.ast.tree.SelectExpression This exception is raised during parsing SQL to HQL. If you will check method getFirstThenNode() from class CaseNode.java in package org.hibernate.hql.internal.ast.tree, you are able to see casting to SelectExpression. And there is […]

Few tips for Atlassian Confluence/Jira administrators for better performance
Introduction Few days ago, I created few notes about Confluence and Jira. I follow Atlassian Docs and few things from my own experience. This post is only summary of all of that what I found at internet and what I tried to do as best practices. I hope you will find here some new suggestions and […]