Archives de catégorie : Non classé

Java 8 : date and time

Temporal formatting Parsing a String to get a date/time objects (Too) Generic way : DateTimeFormatter df = …; TemporalAccessor d = df.parse("dd/mmmm/…)"; Good for generic processing : DateTimeFormatter df = …; LocalDateTime d = df.parse("dd/mmmm/…", LocalDateTime::from); Good for one shot processing … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Gitlab CI : write pipelines

General hints to write pipeline Validate a yaml Go in the gui/CI/CD/pipelines menu and then click on the CI Lint button and paste your yaml file. Note that it doesn’t cover all issues but a lot of. We could also … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Cygwin tricks

* Remove the .exe extension when autocomplete for cygwin commands (to add in .bashrc): shopt -s completion_strip_exe * By default grep doesn’t use color to emphase matching We could enable that by adding an alias in ~/.bashrc such as : … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Write Bash Scripts

Two ways of using scripts : 1) sh 2 bash 1) sh is available in any linux distrib. That implements the POSIX standard. Advantage : strong compatibility Drawback: cumbercome syntax (ex: compared elements has to be inside double quotes) and … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Linux General Commands

Name Service Switch libraries COMMANDS Survival kit :) apt install -y less procps vim net-tools wget Timezone configuration The /etc/localtime file configures the system-wide timezone of the local system that is used by applications for presentation to the user. That … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Cygwin my packages

My package list Export package list : cygcheck -cd | tail -n+3 | cut -d’ ‘ -f1 > package-list.txt

Publié dans Non classé | Laisser un commentaire

Kubernetes : overview, install and uninstall

-Kubernetes goals From the official website : Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. The containers orchestrator provides high-level features, (mainly focused on automation) to manage applications … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Microservices with Spring Boot , Spring Cloud, Consul and Docker

Some choices about technologies Relying on Spring Boot is now a standard for java applications strongly focused on open source technologies. But to take advantages of microservices, we cannot not only rely on that because microservices require communication between services … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

PostgreSQL : basic

Documentation 10.0 psql : https://www.postgresql.org/docs/10/app-psql.html Basic useful info Server program : postgres Client program : psql Default listener port : 5432 Jdbc Url : jdbc:postgresql:database jdbc:postgresql://host/database jdbc:postgresql://host:port/database config location : /var/lib/postgresql/data/postgresql.conf psql Commands Connect to the interactive terminal by specifying … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Docker : how to diagnostic common issues

Docker daemon start/stop issue Symptom : A container cannot be stopped or removed AND trying to stop/start the docker daemon doesn’t help : the daemon looks hanging. Cause : The container mounted a directory that it didn’t release even after … Continuer la lecture

Publié dans Non classé | Laisser un commentaire