Skip to content

Instantly share code, notes, and snippets.

View ilaborie's full-sized avatar
🐙
Hacking

igor ilaborie

🐙
Hacking
  • Toulouse
  • 11:44 (UTC -12:00)
View GitHub Profile
@ilaborie
ilaborie / .wezterm.lua
Last active November 25, 2023 10:58
Wezterm configuration
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Igor Laborie",
"picture": "https://avatars.githubusercontent.com/u/111920?s=400&u=3006b20d2aa5f5ecf5da667af6e0ff723ad7ac22&v=4",
"label": "Senior software developer",
"email": "ilaborie@gmail.com",
"phone": "+33 6 43 19 90 76",
"summary": "I am a passionate developer, I have been doing it professionally for more than 20 years.\nMy curiosity and my eagerness to do things right have pushed me to leave my comfort zone (Java) to go towards other horizons (Rust, Kotlin, Scala, Web, ...).\nMy interest in sharing allows me to thrive in teamwork.\nAnd I also pushed further this will of transmission through the conferences I gave or in the local communities of developers.",
"location": {
@ilaborie
ilaborie / GraphQLMultipart.kt
Last active February 27, 2021 07:32
Handle Multipart GraphQL Request with SpringBoot and graphql-kotlin
import com.expediagroup.graphql.spring.execution.QueryHandler
import com.expediagroup.graphql.spring.model.GraphQLRequest
import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.reactive.asFlow
import mu.KotlinLogging
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@ilaborie
ilaborie / Duration+Ext.kt
Last active March 2, 2020 12:38
Duration utils in Kotlin
val Int.nano: Duration
get() = ofNanos(this.toLong())
val Int.nanos: Duration
get() = ofNanos(this.toLong())
val Long.nano: Duration
get() = ofNanos(this)
val Long.nanos: Duration
get() = ofNanos(this)
@ilaborie
ilaborie / index.html
Created June 10, 2019 16:15
Test dialog tout naze
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
@ilaborie
ilaborie / Var.java
Created April 22, 2019 08:48
Quizz
public class Var {
public static void main(String[] args) {
var var = "var";
System.out.println(var);
}
}
@ilaborie
ilaborie / MonteCarlo.scala
Created January 30, 2019 07:28
Test MonteCarlo Pi en Scala
package io.github.ilaborie.loops.samples
import java.text.NumberFormat
import scala.annotation.tailrec
import scala.util.Random
object MonteCarlo {
def main(args: Array[String]): Unit = {
@ilaborie
ilaborie / main.kt
Created September 13, 2018 12:11
Micro stat collector for a DevfestToulouse survey
import java.io.File
typealias Talk = String
typealias Counter<T> = Map<T, Int>
operator fun <T> Counter<T>.plus(value: T): Counter<T> {
val current = this.getOrDefault(value, 0)
return this + (value to (current + 1))
}
@ilaborie
ilaborie / node-plopper.sh
Created August 26, 2017 10:14
Generate TS project
#!/usr/bin/env bash
APP=$1
# dir
echo "Create $APP folder"
mkdir $APP
pushd $APP
# Git
git init
#!/usr/bin/env bash
# nvm
echo "=== Install NVM ==="
echo "see https://github.com/creationix/nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm