Skip to content

Instantly share code, notes, and snippets.

bobberkarl

Block or report user

Report or block bobberkarl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ygotthilf
ygotthilf / jwtRS256.sh
Last active Sep 19, 2019
How to generate JWT RS256 key
View jwtRS256.sh
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@kristopherjohnson
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.