JDriven Blog

Don't be afraid of Docker

Posted on by  
Jacob van Lingen

As a developer, you are familiar with Docker. You push your images to the Hub, use Compose locally and know a thing or two about Kubernetes. Or…​ Well…​ To be honest…​ You don’t. And you are ashamed you don’t know anything about it. You browse the internet and it’s so overwhelming. So you stop looking and continue what you’ve been doing all the time. Deep inside, you still wonder. Can’t anyone not just explain Docker in simple terms? Is it really this hard? Or am I just missing something really obvious?

Continue reading →

Clojure Goodness: Getting Results From Multiple Functions With Juxt Function

Posted on by  
Hubert Klein Ikkink

The function juxt can be used to get results from multiple functions on the same argument in one go. We pass the functions we want to invoke as arguments to the juxt function. This results in a new function that will return a vector with the results from each original function that is passed to the juxt function. So the first element in the result vector is the result of the first function, the second element is the result of the second function and so on. The documentation of the juxt function shows this clearly as juxt a b c ⇒ [a(x) b(x) c(x)].

In the following example we use the juxt function to apply multiple functions on a string, collection and map:

Continue reading →

Practical Money in Java

Posted on by  
Peter Steman

Introduction

While investigating Protobuf I shot from the hip and wrote that: to model money, one should use BigDecimal. That’s the conventional wisdom and it is correct - in a lot of cases. It’s fine when you deal with one single currency and you are most of all concerned with the precision of financial calculations. But what are some other options? let’s find out.

Continue reading →

Clojure Goodness: Reapply Function With Iterate To Create Infinitive Sequence

Posted on by  
Hubert Klein Ikkink

The iterate function create a lazy, infinitive sequence based on function calls. The iterate function takes a function and an initial value as arguments. The first element in the sequence is the initial value, next the function is invoked with the previous element as argument and this continues for each new element. Suppose we have a function #(+ 2 %) that adds 2 to the input argument. Then if we use this function with iterate and start with value 1 the first elements of the sequence will be 1, (+ 2 1), (+ 2 3), (+ 2 5). So first element is the initial value, next element is the invocation of the function with input argument 1. The result of this function is 3, which is then the input for the function to calculate the next element and so on.

In the following example code we use iterate in different scenario’s:

Continue reading →

An introduction to Reverse Shells

Posted on by  
Niels van Nieuwenburg

In my last blog I gave you a small introduction into the term "Reverse Shell". I described it as: "A Reverse Shell is where your target machine creates a connection to your machine, after which you get a shell on the target machine in which you can execute system commands." It is similar to SSH, but without any encryption and the connection is created the other way around (from target to you, instead of you to the target).

Continue reading →

Clojure Goodness: Combine First And Next Functions Multiple Times

Posted on by  
Hubert Klein Ikkink

The first function in Clojure returns the first item of a collection. The next function returns a new sequence with all elements after the first element from a collection. Clojure adds some utility methods to combine first and next with different combinations. We can use the function ffirst which is will return the first element of the first element of a collection and the nfirst function to get the next elements from the first element of a collection. We can use the function fnext to get the first element of the next elements of a collection and the function nnext to get the next elements of the next elements of a collection.

In the following example we use the ffirst, nfirst, fnext and nnext:

Continue reading →

How an interactive shell can make your life easier after getting a Reverse Shell

Posted on by  
Niels van Nieuwenburg

At JCore, we follow a three year program to become senior developers. After following this program successfully, you will be promoted to the JDriven company. In the final year, we have a specialization in a topic of our choice. I chose to specialize myself further into security. I have been studying this topic for some time now, even contributing to the fast track courses as a security teacher. Until now, most of my time I spent on the defending side and now I want to take a look on "the other side". So my specialization is all about attack, also described as joining "The Red Team".

Continue reading →

Java Joy: Using Functions To Replace Values In Strings

Posted on by  
Hubert Klein Ikkink

Since Java 9 we can use a function as argument for the Matcher.replaceAll method. The function is invoked with a single argument of type MatchResult and must return a String value. The MatchResult object contains a found match we can get using the group method. If there are capturing groups in the regular expression used for replacing a value we can use group method with the capturing group index as argument.

In the following example we use the replaceAll method and we use a regular expression without and with capturing groups:

Continue reading →

Practical Protobuf - First call

Posted on by  
Peter Steman

In the previous blog I started my journey into Protobuf and introduced my first steps by introducing an example Contract service and some business operations on it.
Now let’s start with diving into details of how to model the gRPC calls.

Continue reading →

shadow-left