Author Archives: tobias
Monitor Enery with Shelly 3em, Raspberry Pi, Node Red, PostgreSQL, MQTT(Mosquito), …
Trying to write down some of the things I did to get this working What Shelly 3em publishes You can see all the topics of the mqtt broker by doing like this :mosquitto_sub -d -v -t ‘#’The ‘#’ means ALL … Continue reading
Useful docker commands
Download Docker image docker pull python Start up Docker image with just a bash shell as entrypoint docker run -it –rm –name python python /bin/bash now you should see something like this : Attach to a running docker container docker … Continue reading
Java & JSON : How to serialize NULL
So how do you serialize NULL ? NULL would typically mean that the attribute is omitted from the json, but what if you WANT the NULL to be there, to symbolize an attribute that should be REMOVED.
Mockito and JUnit 5
The purpose of this post is simply to give a hint on how to use Mockito, Spy, and JUnit 5.
SQL Scratch
These are just scratches/notes for my work with Prestashop Create copy of table / duplicate table (select into kind of)
Functions as Arguments Java vs Scala, Game Set Match Scala Wins!
This is how you would create a function that takes a function as argument in Java The Function<A,B> myFunc = num -> “Value = ” + num;Here :A = the type of the first argument, in this example an intergerB … Continue reading
Apache Cassandra Secondary Indices
How are Secondary Indices really stored ? This is based on the article from Datastax found here; https://www.datastax.com/blog/2016/04/cassandra-native-secondary-index-deep-dive Let’s just create a simple table
1 2 3 4 5 |
CREATE TABLE customer ( id int PRIMARY KEY, city text, name text ) |
Or visualized as a table : Column Type Key id int Primary Key city text name … Continue reading
Print stacktraces for all threads on shutdown
If your microservice stops responding from time to time, and they only way out is to kill it with SIGINT or SIGTERM then adding a shutdown hook might be the way to go. Do note that this will not work … Continue reading
Apache Zeppelin, with Spark and Cassandra, the perfect tool
Zeppelin has become one of my favourite tools in my toolbox. I am heavily designing stuff for Cassandra and in Scala, and even though I love Cassandra there are times when things just gets so complicated with the CQL command … Continue reading
Remove the cardo-updater agent from OSX
I have the intercom from Cardo Systems, and it is really good BUT when I updated the firmware some time agoe, it decided to install some software that takes port 8080, which is one of those really common ports used … Continue reading