Skip to content

Instantly share code, notes, and snippets.

View sdeleuze's full-sized avatar

Sébastien Deleuze sdeleuze

View GitHub Profile
// IE
if(typeof(window.console) === 'undefined') {
window.console = {};
window.console.log = window.console.error = window.console.info = window.console.debug = window.console.warn = window.console.trace = window.console.dir = window.console.dirxml = window.console.group = window.console.groupEnd = window.console.time = window.console.timeEnd = window.console.assert = window.console.profile = function() {};
}
var console = window.console;
// IE8 & 9
var methods = ['log', 'debug', 'info','warn','error','assert','dir','clear','profile','profileEnd'];
@sdeleuze
sdeleuze / rs.java
Last active February 8, 2016 12:06
Reactive Streams interfaces
public interface Publisher<T> {
void subscribe(Subscriber<? super T> s);
}
public interface Subscriber<T> {
void onSubscribe(Subscription s);
void onNext(T t);
void onError(Throwable t);
void onComplete();
}
public interface Subscription {
@sdeleuze
sdeleuze / gist:55e002d9e2a91990b591f650f18d348c
Created July 3, 2018 07:37
Spring Fu minimal Netty webapp compilation as native image with GraalVM 1.0 RC3
error: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Error: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization methods and call them explicitly from your main entry point.
Trace: object io.netty.util.internal.ObjectCleaner$AutomaticCleanerReference
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
@sdeleuze
sdeleuze / keybase.md
Created July 18, 2018 20:15
keybase.md

Keybase proof

I hereby claim:

  • I am sdeleuze on github.
  • I am sdeleuze (https://keybase.io/sdeleuze) on keybase.
  • I have a public key ASBnYH1FZBqEFVtRTUE9cmsL6xifx7TJ1qfR2NAbp3tzZAo

To claim this, I am signing this object:

@sdeleuze
sdeleuze / kotlin-frontend.md
Last active October 25, 2022 14:50
My call for Kotlin as a major frontend language

My call for Kotlin as a major frontend language

I try to push for quite a long time for first class support for WebAssembly in Kotlin because I really believe that frontend development is a domain where Kotlin can be as strong as in mobile, and because this is something that would also help to increase even more the adoption on server-side.

I truly appreciate all the work already done by Kotlin/JS and Kotlin/Native teams. The dead code elimination tool and the initial WebAssembly support in Kotlin/Native are important steps in the right direction. But I believe that Kotlin needs now to make frontend a real priority to take it to the next level.

Need for a consistent and unified web frontend strategy

The first point I would like to raise is that what Kotlin needs IMO is a consistent strategy about web frontend wich includes both Javascript and WebAssembly related efforts. I can u

@sdeleuze
sdeleuze / pre-merge-commit
Last active April 2, 2025 15:54
Git hooks preventing merging of main in Spring baseline branches. Use `git rebase` instead of previous usages of `git merge` with fast forward.
#!/usr/bin/env bash
# -------------------------------------------------------------------------#
# Avoid merging main into baseline branches #
# -------------------------------------------------------------------------#
#
# Put this file in your local repo, in the .git/hooks folder and make sure
# it is executable.
#
# The name of the file *must* be "pre-merge-commit" for Git to pick it up.
#