As default in many Linux distributions root login via ssh is possible. But depending on your risk awareness this might be a bad idea. E.g. normally you should not work as root, but have a special user that adminsters the system. So why allowing to login as root via ssh? For that reason it’s a good idea to deactivate the possibility to login as root. Continue reading
Automatically updating system clock using ntpd
Sometimes it is necessary to ensure the system clock of all systems is synchronized. E.g. when running a virtual machine, depending on your virtualization technology and your settings your system clock may diverge. This can be achieved by updating the system clock using ntpd
regularly. Continue reading
Encodings in Java
When using text in Java, depending on the system, language and api you use, there exist different names for the same encoding. See how to get to know the correct naming of your encoding of choice. Continue reading
Deactivate Firefox search in location bar
Using the Firefox search within a local network, Firefox uses the integrated search instead of trying to access the server in case it is not a full domain name. This is really annoying, especially when you try to access servername
. Firefox tries to search for servername
instead of trying whether there is a server with exactly that namke. But there is a solution for that. Continue reading
Opening Firefox search in new browser tab
When using the integrated search in Firefox normally the result is shown in the browser tab that is currently shown. In my opinion that is quite nasty for one reason: In case you want to search something that does not correspond with the content your current tab displays, the result replaces the content. Continue reading
A new scope for Contexts and Dependency Injection – CDI
Dependency Injection is a great approach to decouple software components. Furthermore it is possible to inject the current context (state) of a software component. In Java EE 6 there are four scopes. With Java EE 7 a new scope was added. This post describes how to implement an additional scope that lives in its own lifecycle.
Continue reading
Constants for Java EE
When working with Java EE there are situations, in that constants occur. As there are no enums but only int constants this is a pretty tough task in case you don’t remember the values of the constants. But of course there is a solutions for that. Continue reading
Generating secure passwords
Normally for each device, service and software there should be used a unique password. As this isn’t an easy tasks, many people use a default password for a number of services and devices. But using Linux there is a small smart tool that generates passwords easily. This tool is called apg
. Furthermore storing all the passwords in a safe enhances comfort and security dramatically.
Continue reading
Globally ignoring files in git
When using git, it is possible to ignore files using .gitignore
. Using your favorite ide, different other files or folders like (.idea, .iml, .settings, .project, .classpath,…) may be created in within the working copy. It is annoying to add the ide specific files manually to the .gitignore
for every repository. Continue reading
Getting module and application name in Java EE
When running an Java EE application, in different situations it’s useful to know it’s own module and application name. In order to get these it is possible to access them via JNDI. Continue reading