Skip to content

Instantly share code, notes, and snippets.

@nbardiuk
nbardiuk / how-gpg.md
Created September 20, 2017 11:55 — forked from djspiewak/how-gpg.md

How to GPG as a Scala OSS Maintainer

tl;dr Generate a GPG key pair (exercising appropriate paranoia). Send it to key servers. Create a Keybase account with the public part of that key. Use your keypair to sign git tags and SBT artifacts.

GPG is probably one of the least understood day-to-day pieces of software in the modern developer's toolshed. It's certainly the least understood of the important pieces of software (literally no one cares that you can't remember grep's regex variant), and this is a testament to the mightily terrible user interface it exposes to its otherwise extremely simple functionality. It's almost like cryptographers think that part of the security comes from the fact that bad guys can't figure it out any more than the good guys can.

Anyway, GPG is important for open source in particular because of one specific feature of public/private key cryptography: signing. Any published software should be signed by the developer (or company) who published it. Ideally, consu

Keybase proof

I hereby claim:

  • I am nbardiuk on github.
  • I am nbardiuk (https://keybase.io/nbardiuk) on keybase.
  • I have a public key ASA5L4daqULGKJ6QOuGTf831RpgYXyErnBd0U4JBP6ql7go

To claim this, I am signing this object:

@nbardiuk
nbardiuk / FoldLeftTermination.java
Created April 10, 2016 21:20
foldLeft with early termination for javaslang stream
import javaslang.collection.Stream;
import java.util.function.BiFunction;
import java.util.function.Predicate;
public class FoldLeftTermination {
public static void main(String[] args) {
Stream<Integer> numbers = Stream.iterate(0, i -> i + 1)
#!/usr/bin/python
import telnetlib
print "Connecting to the server"
tn = telnetlib.Telnet("192.168.1.1")
print "Connected, waiting to Login"
tn.read_until("Login: ")
tn.write("\r") #login
@nbardiuk
nbardiuk / download.py
Created October 19, 2012 12:13
Download picasa album using rss file
#!/usr/bin/env python
import urllib
import re
import os
from BeautifulSoup import BeautifulSoup
def downloadImages(file):
file_handler = open(file).read()
soup = BeautifulSoup(file_handler)