- Adopted from: https://stubby4j.com/docs/admin_portal.html
- Inspired by Swagger API docs style & structure: https://petstore.swagger.io/#/pet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib | |
, stdenv | |
, jdk | |
, gradle | |
, mavenRepo | |
}: | |
stdenv.mkDerivation { | |
pname = "built-with-gradle"; | |
version = "0.0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; | |
flake-utils.url = github:numtide/flake-utils; | |
rust-overlay.url = github:oxalica/rust-overlay; | |
}; | |
outputs = { nixpkgs, flake-utils, rust-overlay, ... }: | |
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let | |
pkgs = import nixpkgs { |
Or, more precisely, why are two separate but otherwise seemingly identical errors created by Go's errors.New
function not equal according to the ==
operator?
Consider the output of the following small program (Go Playground link) which compares Go's error values for equality:
package main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample from @citizen428 https://dev.to/citizen428/comment/6cmh | |
FROM golang:alpine as build | |
RUN apk add --no-cache ca-certificates | |
WORKDIR /build | |
ADD . . | |
RUN CGO_ENABLED=0 GOOS=linux \ | |
go build -ldflags '-extldflags "-static"' -o app | |
FROM scratch | |
COPY --from=build /etc/ssl/certs/ca-certificates.crt \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace fsharp_websocket | |
module WebsocketHelpers = | |
open System | |
open System.Net.WebSockets | |
open System.Threading | |
open Hopac | |
let readMessage buffer messageType (stream : #IO.Stream) (socket : WebSocket) = job { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |