Skip to content

Instantly share code, notes, and snippets.

View nicokosi's full-sized avatar

Nicolas Kosinski nicokosi

View GitHub Profile
@nicokosi
nicokosi / spark-word-count.ipynb
Created August 19, 2018 16:18
Spark-word-count.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nicokosi
nicokosi / vim-basics.md
Last active August 24, 2018 07:36
My personal vim cheatsheet

Vim basics

Via command examples.

Open

Single window

Example:

vim Specs.hs Ladder.hs
@nicokosi
nicokosi / docker-compose.yml
Last active August 28, 2018 04:52
Resources for experimentations with docker/app (https://github.com/docker/app)
version: "3.2"
services:
elasticsearch:
# Error: driver Additional property driver is not allowed
# environment:
# - cluster.name=secu-replay
# - discovery.type=single-node
# - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
https://docs.google.com/document/d/1bUi8IydEUKmigP5fMlutCAUbIO4s-Xj9HpBef8cNvfI/edit
@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
@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 / 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 / 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

'use strict';
module.exports = {
roman
};
function roman(arabic) {
let r = "I".repeat(arabic);
if (arabic === 4) {
return "IV";
'use strict';
module.exports = {
answer
};
function answer(number) {
if (number % 15 === 0) {
return "FizzBuzz";
}