Skip to content

Instantly share code, notes, and snippets.

View iDuronto's full-sized avatar

Bourne Haber iDuronto

  • ScreetSec Inc.
View GitHub Profile
@djui
djui / readln.go
Created December 2, 2015 10:08
Minimal readline with timeout example
import (
"bufio"
"errors"
"strings"
"time"
)
// Readln reads and returns a single line (sentinal: \n) from stdin.
// If a given timeout has passed, an error is returned.
// This functionality is similar to GNU's `read -e -p [s] -t [num] [name]`
@jordan-wright
jordan-wright / main.go
Created August 11, 2020 02:56
Converting an ssh.PublicKey to an *rsa.PublicKey in Go
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"log"