Skip to content

Instantly share code, notes, and snippets.

@otherjoel
otherjoel / wallpaper.rkt
Created March 18, 2021 20:32
IT Wallpaper Generator
#lang racket/base
(require br/macro
pict
racket/class
racket/draw)
;; Make wallpaper for use on server desktops
(define mint-green (make-object color% 1 133 116))
@dvanhorn
dvanhorn / push.yml
Created January 5, 2021 20:29
GHA for Racket with scribble and deploy via rsync
on:
- push
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Install dependencies
@asbjornu
asbjornu / openapi-to-docs.md
Last active July 13, 2023 22:41
From OpenAPI to Documentation

From OpenAPI to Documentation

We are at a ripe time to formalize our API development process by using OpenAPI as our means to describe the APIs we develop and all changes we want to make to them. This repository holds a description of how that process may look like and will act as a prototype of its initial implementation.

Rationale

We already have a [Developer Portal][developer-portal] in which we have invested

@steveklabnik
steveklabnik / oil.md
Last active January 15, 2021 21:32
Why is the price of oil negative?

so, why is oil's price negative?

(note: I am a software developer who has an interest in finance. This is my understanding. I am not a professional.)

first, what does that even mean? so, the "price of oil" is the price of "WTI Crude", which is a specific kind of oil. There are multiple kinds of oil with multiple prices.

Why is it negative? to understand this, we also have to understand why WTI is the price of oil: that is, it's the kind of oil that underpins the New York Mercantile Exchange's oil futures contracts. The NYMEX is kind of like the stock market, but for commodities, aka stuff.

@kevinswiber
kevinswiber / petstore-minimal-optimized.hcl
Last active August 29, 2020 15:13
OpenAPI Spec in HCL
swagger = "2.0"
info {
version = "1.0.0"
title = "Swagger Petstore"
description = "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"
terms_of_service = "http://swagger.io/terms"
contact {
name = "Swagger API Team"
@honzajavorek
honzajavorek / content-negotiation.md
Last active August 29, 2015 14:06
Content negotiation implementations in Python

Content negotiation implementations in Python

work in progress / kick-off / sort of a ToC / ... Currently it's just a list of interesting projects where the implementation could possibly be found.

Major Web Frameworks

@francescoagati
francescoagati / app.coffee
Created July 3, 2013 23:08
node.js + express.js + bacon.js -> wrap express.js in functional reactive programming
express = require("express")
Bacon = require("baconjs")
app = express()
route = (app) -> (path) ->
bus = new Bacon.Bus()
app.get path, (req,res) ->
bus.push
req: -> req
@qerub
qerub / gist:3219854
Last active April 21, 2021 09:46
Representing [Clojure] code in JSON
; Context:
; http://stackoverflow.com/questions/3436216/how-to-map-clojure-code-to-and-from-json
(defn escape-string [x]
(clojure.string/replace x #"^[':\\]" "\\\\$0"))
(defn code-to-json [x]
(condp #(%1 %2) x
number? x
symbol? (str \' (name x))