Base64 on terminal

Encode a string

$ echo -n '' | openssl base64 -e

The -n after the echo command, prevents echo from appending a newline character on the end of the string.

Decode a string

$ echo 'U29mdHdhcmV0ZXN0ZXIuaW5mbw==' | openssl base64 -d

Encode content of file

$ openssl base64 -e -in example.txt -out example.b64

Embed SLOCCount into Jenkins jobs


Install SLOCCount and cloc on system.

$ aptitude install sloccount cloc

Search and install the “SLOCCount Plugin”.

jenkins sloccount plugin
Search SLOCCount Plugin


Now search your job and start configuration and insert the command “Build > Execute Shell”.

sloccount --duplicates --wide --details ${WORKSPACE}/<file|folder> >

As last step add the Post-Build-Action – “View SLOCCount results” and insert the generated report “”.

sloccount result path
Configure Post-Build-Action

The plugin just show the number of lines per file, file type and folder. No estimated project value or other informations! This information you can see direct on generated report. After running the build, your screen should look similar like this:

sloccount report
SLOCCount report

Markup validation with Jenkins


Search and install the “Unicorn Validation Plugin” and “Plot Plugin”

jenkins unicorn plugin
Search for Plugin


Within the build section, add a build step “Unicorn Validator”. For the Site to validate add a URL to a site that you want to test. Before you configure the Post-build Actions you should save and run. After 1st run the workspace should look similar.

unicorn results
Workspace files

Now start configuration again. On Post-build Actions section add “Plot build data”, and add the following details:

unicorn configuration
Plot configuration

Now you can run the build again and on job navigation you see the item “Plots”. Repeat the last step for plotting of css results. As value for “Plot title” use “CSS Validation errors” and for “Data series file” use “”.

Agile view for Jenkins


Search and install the “Radiator View” plugin.

radiator plugin jenkins
Select Radiator View Plugin


After installation create a new view, similar to configuring the more conventional list views.

radiator view jenkins
Select Radiator view

Now select all desired jobs and press “Save” button.

radiator agil view
Agile view

The build radiator view displays a box for each build with the job name and some other details, depending on build steps and test methods.

Backup and restore Jenkins


Create a new folder with read/write permission for Jenkins.


# create directory
$ mkdir backup_jenkins

# change user
$ chown jenkins:jenkins backup_jenkins/

Now install the Jenkins Plugin “ThinBackup”.

thinbackup plugin for jenkins

Backup configuration

After installation and restart, you can start with backup configuration “Manage Jenkins > ThinBackup > Settings”. For Backup directory insert the path for directory that you created. Complete the configuration by your needs and press “Save” button.

thinbackup settings


Now you could wait for 1st automated backup or press the “Backup Now” button “Manage Jenkins > ThinBackup”.


For restore simply select Restore “Manage Jenkins > ThinBackup”. Select backup from list and press “Restore” button.


RATS – Rough Auditing Tool for Security. Open-Source software to scan C, C++, Perl, PHP and Python code. For other languages see Fortify.


# CentOS
$ yum install rats

# Debian
$ aptitude install rats

# wget
$ wget 

# curl
$ curl --remote-name

# extract
$ tar xfz rats-2.3.tar.gz

# change directory
$ cd rats-2.3

# compile
$ ./configure && make && sudo make install

Execute RATS

# Simple run
$ rats --resultsonly <directory>

# Advanced run
$ rats --quiet --xml -w 3 <directory>