Skip to content

Instantly share code, notes, and snippets.

ygotthilf /
Last active Aug 7, 2020
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out
cat jwtRS256.key
kristopherjohnson / minReduce.swift
Last active Mar 13, 2019
Using Swift reduce() and min() to find minimum value in an array
View minReduce.swift
struct Value {
let num: Int
init(_ n: Int) { num = n }
let a = [Value(3), Value(2), Value(1), Value(4), Value(5)]
let min1: Value = a.reduce(Value(Int.max)) {
($0.num < $1.num) ? $0 : $1
You can’t perform that action at this time.