Skip to content

Instantly share code, notes, and snippets.

View fteychene's full-sized avatar

Francois Teychene fteychene

View GitHub Profile
{
"openapi": "3.0.1",
"info": {
"title": "App",
"version": "1.0"
},
"paths": {
"/weatherforecast": {
"get": {
"tags": [
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
@fteychene
fteychene / docker-compose-elastic.yml
Created August 10, 2021 08:21
Local Elastic/Kibana stack script
services:
elasticsearch:
image: elasticsearch:7.14.0
hostname: elasticsearch
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
networks:
@fteychene
fteychene / main.rs
Created March 5, 2021 15:13
Warp route test
use warp::{Filter, Rejection};
use warp::generic::Either;
fn other_routes() -> impl Filter<Error = Rejection, Extract = (Either<(Either<(String,), (String,)>,), (String,)>,)> + Clone + Send + Sync + 'static {
// GET /hi
let hi = warp::get().and(warp::path("hi").map(|| "Hello, World!".to_string()));
// GET /hello/from/warp
let hello_from_warp = warp::get().and(warp::path!("hello" / "from" / "warp").map(|| "Hello from warp!".to_string()));
// GET /sum/:u32/:u32
let sum = warp::get().and(warp::path!("sum" / u32 / u32).map(|a, b| format!("{} + {} = {}", a, b, a + b)));
[package]
name = "lolilol"
version = "0.1.0"
authors = ["fteychene <francois.teychene@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
lol-core = "0.7.1"
@fteychene
fteychene / build.gradle
Last active October 14, 2020 09:00
Arrow fx coroutine play on Chuck Norris facts
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.10'
}
apply plugin: 'kotlin-kapt'
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
@fteychene
fteychene / build.gradle.kts
Last active July 29, 2020 06:42
Hexagonal architecture as polymorphic monad stack in Kotlin with Arrow
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.21"
kotlin("kapt") version "1.3.21"
}
repositories {
mavenCentral()
}
@fteychene
fteychene / gameoflife.kt
Created April 30, 2020 07:51
GameOfLife TypeDD and Sequence test
package mtpcraft.tdd.kata
import kotlin.random.Random
sealed class Cell {
companion object
}
object Dead : Cell()
object Living : Cell()
@fteychene
fteychene / build.gradle.kts
Created April 28, 2020 13:57
Basic Zipper in Kotlin with Arrow
plugins {
kotlin("jvm") version "1.3.72"
kotlin("kapt") version "1.3.41"
}
group = "xyz.fteychene.kotlin.sample"
version = "0.1.0-SNAPSHOT"