Static website with Hugo and Nginx

Web development

The goal of this tutorial it’s to show how create a static website with GoHugo.io and Nginx as a reverse proxy. About Hugo GoHugo.io is is one of the most popular open-source static site generators. Have we turned to the past? For some kind of things, we may say yes. Lately, with the explosion of Javascript and client-side application, the server applications sometimes have been transformed in resources providers. With reources I mean also dynamic resources (maybe retrieved form a DB). [Read More]

How to upgrade Sonatype Nexus 2 to Nexus 3

Maven repository

In this article we focus to the OSS version of Nexus. For migrate a nexus version 2 to a nexus version 3 you need to know that the minimal source version of nexus need to be the 2.14.x So if your source Nexus 2 is previous to the 2.14 you need to upgrade that version before start the migration process. Upgrade Nexus 2 Upgrade nexus is very easy, follow these steps: [Read More]

How to configure a custom error page with Nginx

Reverse Proxy

Nginx it’s a very powerful reverse proxy. Sometimes if we have a service redirected by ngnix that is down is not a good practice leave the default error page of Nginx. The reasons of why change the default error page of ngnix are a lot: Hide the reverse proxy technology Show a custom page for each error or service Manifest professionally\ Configuration: Open the “/etc/nginx/sites-enabled/default” configuration file Inside the “server” element put a code like that: error_page 502 /maintenance. [Read More]

Codility Equi Test Solution

Codility

A zero-indexed array A consisting of N integers is given. An equilibrium index of this array is any integer P such that 0 ≤ P < N and the sum of elements of lower indices is equal to the sum of elements of higher indices, i.e. A[0] + A[1] + … + A[P−1] = A[P+1] + … + A[N−2] + A[N−1]. Sum of zero elements is assumed to be equal to 0. [Read More]

Free Solution for check infected files with Java and ClamAv

Web Antivirus

Hello world!! The goal of this tutorial it’s to know how to check infected files with Java and ClamAv. About ClamAv ClamAv it’s a free, open source and cross-platform antivirus software tool-kit that allow to detect many types of malicious software. A very nice feature of ClamAv its the possibility of scan a stream for know if the stream its infected or not. So is not necessary to make mechanics procedures for saving the file and after check the file with an antivirus. [Read More]