Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@nicokosi
nicokosi / JBTechDayforJava2020.md
Last active August 3, 2020 07:40
My notes during the "JetBrains Technology Day for Java" conference (2020-07-10)

Notes during the "JetBrains Technology Day for Java" conference (2020-07-10)

Recordings

Bootiful Testing, by Josh Long

Live demo on Spring reactive code (spring.web.reactive)
Using Inside-out TDD
Http mocking via WireMock
Contract tests (exposed by producer, used by client)
@nicokosi
nicokosi / kotlin-koans-1-intro.kt
Last active July 27, 2020 06:00
My answers to Kotlin Playground Koans: https://play.kotlinlang.org/koans
/* My answers to [Kotlin Playground Koans](https://play.kotlinlang.org/koans) */
/* Intro */
// Hello, world!
fun start(): String = "OK"
// Named arguments
fun joinOptions(options: Collection<String>) =
options.joinToString(prefix = "[", postfix = "]")
{"lastUpload":"2020-04-23T05:05:17.088Z","extensionVersion":"v3.4.3"}
'use strict';
module.exports = {
answer
};
function answer(number) {
if (number % 15 === 0) {
return "FizzBuzz";
}
'use strict';
module.exports = {
roman
};
function roman(arabic) {
let r = "I".repeat(arabic);
if (arabic === 4) {
return "IV";
@nicokosi
nicokosi / tests-secu-vidal.md
Created January 29, 2020 05:55
Quelle stratégie de test pour les API de sécurisation arthur "référentiels Espagne" ?
  • tester la sécurisation ** de spécialités ES : alertes identiques qu'en sécurisant les VMP ? ** non-régression (FR)

  • tester les nouveaux concepts ** recherche par nom (/search?q=) / code (/search?code=) ** UCDV, recherche par nom (/ucdvs?q=) / détail (/ucdv/$id) ** VTM, recherche par nom / détail ** DRUG (DCP/DCPF/DCSA), recherche par nom / détail

@nicokosi
nicokosi / fuel-consumption.json
Last active September 5, 2019 04:02
⛽ Fuel consumption of my own vehicles 🚗 🏍(cf. https://vega.github.io/editor/#/examples/vega-lite/)
[
{
"Liters_per_100_km": 1.8,
"Day": "2019-08-26",
"Vehicle": "Yamaha YBR 125 (2010)",
"Comment": ""
},
{
"Liters_per_100_km": 1.9,
"Day": "2019-07-20",
@nicokosi
nicokosi / spark_datastorm.adoc
Last active October 8, 2019 08:09
Un retour d'expérience sur Apache Spark après le "POC DataStorm" à Vidal
@nicokosi
nicokosi / search-for-ybr-in-leboncoin.zsh
Created November 25, 2018 18:12
ZSH shell command that searches https://www.leboncoin.fr (for Yamaha 125 YBR in Ile-de-France)
(curl -s 'https://api.leboncoin.fr/finder/search' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://www.leboncoin.fr/aw/mes-recherches/' -H 'api_key: ba0c2dad52b3ec' -H 'content-type: text/plain;charset=UTF-8' -H 'origin: https://www.leboncoin.fr' -H 'DNT: 1' -H 'Connection: keep-alive' --data '{"filters":{"category":{"id":"3"},"owner":{},"keywords":{"type":"subject","text":"yamaha YBR"},"location":{"region":"12","regions":["12"],"locations":[{"region_id":"12","label":"Ile-de-France","locationType":"region"}]},"enums":{"ad_type":["offer"]}},"counters":{},"limit":35,"sort_by":"time","sort_order":"desc","user_id":"bfdbcf98-4dd9-4545-9eb5-6cd0159a3d8f","store_id":"15616030"}' | md5 && date) > ~/lbc.log
https://docs.google.com/document/d/1bUi8IydEUKmigP5fMlutCAUbIO4s-Xj9HpBef8cNvfI/edit