Skip to content

Instantly share code, notes, and snippets.

View Cybermaxke's full-sized avatar
🍪
Searching cookies...

Seppe Volkaerts Cybermaxke

🍪
Searching cookies...
View GitHub Profile
@Cybermaxke
Cybermaxke / VelocityEventCoroutines.kt
Last active October 27, 2022 18:27
Velocity Event Coroutines - Use kotlin coroutines inside your velocity event handlers.
import com.velocitypowered.api.event.EventTask
import kotlin.coroutines.Continuation
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.coroutines.startCoroutine
fun suspended(fn: suspend () -> Unit): EventTask {
return EventTask.withContinuation { continuation ->
val completion = object : Continuation<Unit> {
override val context: CoroutineContext

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);