Custom converter for Mongodb and Spring Data for BigDecimal type
Recently I found that MongoDB does not support java’s java.math.BigDecimal as you can read in the official spring data mongodb documentation As it turns out java.math.BigDecimal will be converted to java.lang.String when saved to the database and parsed back to BigDecimal which in most cases…
Spring boot and mongodb with geo-localisation queries 1/3
MongoDB offers a number of indexes and query mechanisms to handle geospatial information, below are some of the features offered by the database : Surfaces Location Data Query Operations Geospatial indexes ….. More detailed information can be found at their website : MongoDB Geospatial queries…
Angular2 prevent ngboopstrap dialogs to close when clicking outside
The default behaviour for bootstrap modal dialogs is to close when you click outside the dialog however this is not always the desired behaviour When using Bootstrap 4 without the angular wrapper you need to add the data-backdrop=’static’ and data-keyboard=”false” to the button in order…
Prevent OSX from idle sleep
There are several ways to prevent an OSX system to sleep when idle such as the caffeine application or changing the parameters in the System preferences However there is an even easier way to accomplish this without installing any extra apps, just open a terminal…
Spring Data force version and lastmodified date to update on JPA Entity
Spring data has a feature that allows you to track automatically a certain amount of fields through annotations : @CreatedDate : The date on which the entity was created @CreatedBy : The user that created the entity @LastModifiedDate : The date the entity was last…
Use Github as a CDN to store and serve static content (JavaScript, CSS, Images) with rawgit
In this article I will be explaining how to use Github’s “raw” feature coupled with rawgit to store and serve static content Please note I assume you have some basic git knowledge 1.- Creating a Github account Ok so first things first, in order to…
OSX Wi-fi and Ethernet network simultaneously connected and static routing
So recently I had a situation where I had my Ethernet and Wifi connected to 2 different networks in my MAC OS X, and I had a very specific use case for this I needed to use the Ethernet connection to access 1 specific host…
Preventing bash commands to be displayed in the history or deleting a specific command from history
It’s sometimes useful when using the linux command line to prevent things to go into the bash history; for example if you’re using curl to download a file while providing your username password. This can be easily done in linux by configuring the HISTCONTROL variable…
Debug Java SSL/HTTPS WebService with man in the middle proxy
In this article I will be showing how to debug WebServices HTTPS/SSL requests by using a Man in the Middle proxy, this can especially be useful when dealing with WebServices errors since all request will go through the proxy we will be able to see…
Linux change timezone and force ntpd synchronization
This short article shows how to change the timezone of the Linux distribution as well as forcing the synchronisation of date/time with the ntpd servers This applies specifically applies to CentOS so some changes might be possible depending on the distribution 1.Change timezone cp /etc/localtime…