Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@nicokosi
nicokosi / data_manipulation.nu
Last active September 6, 2023 02:45
Manipulating data with nushell commands (see https://www.nushell.sh / https://www.nushell.sh/cookbook)
# Download a JSON file from a URL and visualize it:
fetch https://jsonplaceholder.typicode.com/posts
# Visualize a JSON file:
open ./work/tldr/package.json
# Fetch the first 2 JSON array items:
fetch https://jsonplaceholder.typicode.com/posts | first 2
# Fetch raw JSON :
@nicokosi
nicokosi / rust-glossary.md
Last active October 19, 2021 05:45
Rust glossary

Rust glossary

  • borrowing: a borrowed variable is temporary shared to a function that does not own it (see "reference").

  • dereference: taking ownership on a reference using the dereference operator, *. ref

@nicokosi
nicokosi / awesome-brass-bands.md
Last active August 25, 2020 20:35
Awesome brass bands! 🎶🎺🎷
@nicokosi
nicokosi / fun-with-collectors.jshell
Last active July 29, 2020 04:15
JShell experimentations with Java 14 collectors from streams API
// Inspired by Venkat Subramaniam's talk "LJC Virtual Meetup: Exploring Collectors", similar to this former one: https://www.youtube.com/watch?v=z1eaTv_FASg
// See javadoc for Collectors: https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/util/stream/Collectors.html
// Run me with Java 14 via 'jshell --enable-preview'
record Person(String name, int age) {}
var persons = List.of(
new Person("Sarah", 14),
new Person("Venkat", 30),
new Person("Sarah", 65),
new Person("Farid", 12));
@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