A collection of points to remember when designing REST-APIs.
It's generally recommended to use OpenAPI. Chose between Design First or Code First.
| #!/bin/sh | |
| platform="roar-arm64-darwin" | |
| url=$(curl -s https://api.github.com/repos/JanMalch/roar/releases/latest | grep "browser_download_url.*${platform}" | cut -d : -f 2,3 | tr -d '"' | xargs echo -n) | |
| curl -sS -L -o "$(dirname "$0")/roar" "$url" | |
| chmod +x "$(dirname "$0")/roar" | |
| # for OS X (optional), see https://superuser.com/a/28400 | |
| # xattr -d com.apple.quarantine "$(dirname "$0")/roar" | |
| roar -v |
| #!/usr/bin/env node | |
| const http = require("http"); | |
| const childProcess = require("child_process"); | |
| const host = process.env.HOST || '0.0.0.0' | |
| const port = process.env.PORT || '7373' | |
| const requestListener = function (req, res) { | |
| try { |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "github.com/charmbracelet/lipgloss" | |
| "github.com/google/go-github/v77/github" | |
| ) |
| 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.