A collection of points to remember when designing REST-APIs.
It's generally recommended to use OpenAPI. Chose between Design First or Code First.
import { FlowJob } from "bullmq"; | |
export class FlowJobBuilder { | |
private job: FlowJob | |
constructor( | |
firstJob: FlowJob, | |
) { | |
this.job = { ...firstJob } |
import { promisify } from 'node:util'; | |
import { pipeline } from 'node:stream'; | |
export const asyncStream = promisify(pipeline); |
<template> | |
<div aria-hidden="true" class="wave-container"> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"> | |
<path fill="currentColor" | |
fill-opacity="1" | |
:d="d"> | |
</path> | |
</svg> | |
<div class="bottom-filler"></div> | |
</div> |
import { buffer, debounceTime, OperatorFunction, SchedulerLike } from 'rxjs'; | |
/** | |
* Emits buffered values from the source Observable only after a particular time span | |
* has passed without another source emission. | |
* | |
* @param {number} dueTime The timeout duration in milliseconds (or the time | |
* unit determined internally by the optional `scheduler`) for the window of | |
* time required to wait for emission silence before emitting the buffered | |
* source values. |
docs-example-plugin.js |
# usage: killport 8080 | |
killport(){ | |
netstat -lpn | grep ":$1\b" | awk '{sub(/\/.*/, "", $NF); print $NF}' | xargs -i kill -9 {} | |
} |
A collection of points to remember when designing REST-APIs.
It's generally recommended to use OpenAPI. Chose between Design First or Code First.
<!-- https://jsfiddle.net/8cugv62p/ --> | |
<!-- only on click --> | |
<style lang="css"> | |
body { | |
padding: 20px; | |
} | |
#toggled { | |
margin-top: 20px; | |
width: 300px; |
body { | |
padding: 20px; | |
} | |
.container { | |
display: inline-flex; | |
/* or display: flex; */ | |
flex-direction: row-reverse; | |
justify-content: flex-end; | |
} |
class CaesarConverter { | |
// cannot use operator plus because it would be shadowed and not used | |
operator fun String.minus(offset: Int) = | |
this.toCharArray().map { it - offset }.joinToString(separator = "") { it.toString() } | |
} | |
fun caesar(block: CaesarConverter.() -> String) = CaesarConverter().block() | |
fun main() { | |
val encrypted = caesar { "test" - 4 } |