Skip to content

Instantly share code, notes, and snippets.

View ShaneDelmore's full-sized avatar

Shane Delmore ShaneDelmore

View GitHub Profile
@ShaneDelmore
ShaneDelmore / &&.scala
Created January 29, 2018 16:28 — forked from olafurpg/&&.scala
Having fun with Scala extractor objects. The && combinator can be used to merge multiple extractors into one MEGA extractor.
object && {
def unapply[A](e: A) = Some(e -> e)
def test() {
val greaterThan10 = Find[Int](_ > 10)
List(1, 2, 11, 3) match {
// All must succeed
case greaterThan10(ten) && Last(last) && Head(head) =>
println(ten) // 11
println(last) // 3
#!/bin/bash
#echo "Start Export Process"
#echo "Log into Keybase..."
keybase login
#echo "Exporting your PGP keys..."
keybase pgp export -o keybase.public.key
keybase pgp export -s -o keybase.private.key