Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Riduidel / Main.java
Created December 10, 2020 06:26
Visitor - 1 - main simple
import java.util.Arrays;
import java.util.List;
class Feuille {
public String montrerFeuille() { return "🍃"; }
}
class Fleur {
public String afficherFleur() { return "🌺"; }
}
public class Main {
package com.adeo.costing.computer.swagger;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.DynamicTest.dynamicTest;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
fizzbuzz::Int->String
fizzbuzz n | (mod n 3)==0 && (mod n 5)==0 = "FizzBuzz"
| (mod n 3)==0 = "Fizz"
| (mod n 5)==0 = "Buzz"
| otherwise = show n
main = do
print $"3="++(fizzbuzz 3)
print $"4="++(fizzbuzz 4)
print $"5="++(fizzbuzz 5)
@Riduidel
Riduidel / resume.json
Last active January 25, 2026 14:59
JSONResume
{
"basics": {
"name": "Nicolas Delsaux",
"label": "Engineering manager",
"picture": "",
"email": "nicolas.delsaux@gmx.fr",
"phone": "07 69 99 61 17",
"summary": "Développeur java depuis l'an 2000, j'ai d'abord acquis un niveau de compétence confortable sur l'ensemble des éléments techniques du développement avant d'évoluer vers des rôles d'architecte, puis d'engineering manager. ",
"website": "http://riduidel.wordpress.com",
"profiles": [
@Riduidel
Riduidel / pom.xml
Created August 30, 2019 16:42
A part of pom.xml showing fizzed-watcher configuration
<plugin>
<groupId>com.fizzed</groupId>
<artifactId>fizzed-watcher-maven-plugin</artifactId>
<configuration>
<touchFile>target/watcher.docs.touchfile</touchFile>
<watches>
<watch>
<directory>${asciidoc.source.docs.directory}</directory>
</watch>
</watches>
@Riduidel
Riduidel / rrss2imap.email.enveloppe.jinja2
Created July 12, 2019 16:40
rrss2imap.email.enveloppe.jinja2
MIME-Version: 1.0
User-Agent: rss2email
Content-Transfer-Encoding: base64
To: {{to}}
Subject: {{title}}
Date: {{date}}
Content-Type: text/html; charset="{{charset}}"
{% for l in links %}X-RSS-Feed: {{l}}{%- endfor %}
{% for a in from %}From: {{a}}{%- endfor %}
@Riduidel
Riduidel / arabian_to_roman.kt
Created May 23, 2019 10:02
Une version Kotlin d'une solution vachement chouette au problème classique des nombres arabes exprimés avec des chiffres romains
val MAPPINGS = java.util.TreeMap(mapOf(1 to "I",
4 to "IV",
5 to "V",
9 to "IX",
10 to "X",
40 to "XL",
50 to "L",
90 to "XC",
100 to "C",
400 to "CD",
@Riduidel
Riduidel / DataMunging.java
Last active April 3, 2019 19:50
data munging
public class DataMunging {
public static void main(String[] args) throws IOException {
System.out.println(
Files.lines(Paths.get("weather.dat"))
.map(line -> line.trim())
.map(line -> line.split(" +"))
.filter(elements -> elements[0].matches("[0-9\\*]+"))
.map(elements -> new AbstractMap.SimpleEntry<>(elements[0],
Integer.parseInt(elements[1].replace("*", "")) - Integer.parseInt(elements[2].replace("*", "")
)))
@Riduidel
Riduidel / Converter.java
Created March 26, 2019 15:13
Un exemple de transformation en nombre romain
public class Converter {
private static class Bound {
public final int number;
public final char symbol;
public Bound(int number, char symbol) {
super();
this.number = number;
this.symbol = symbol;
}
}