Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

18 December, 2023

 

 

To add a watermark to all of the images in a directory:

1. install imagemagick

sudo apt-get install imagemagick

2.  run the following script:

counter=1; total=$(ls my_files_dir/* | wc -l); for img in my_files_dir/*; do echo "Processing file $counter of $total: $img"; convert "$img" -gravity center -pointsize 35 -fill 'maroon' -draw "text 0,0 'my watermark text'" "$img"; ((counter++)); done

23 August, 2017

Deploying a Spring application as a Linux service behind nginx (Ubuntu Server 16.04)


1. Create, build and run locally the application

The application to deploy is a JPA Data with REST from the official spring docs. But, instead of the system wide gradle mentioned in the Spring documentation we'll be using the ./gradlew wrapper since this is the recommended way of doing things. The gradle wrapper is usually committed to the source control.