Skip to content

Instantly share code, notes, and snippets.

@UshF
UshF / gpg-wkd.md
Created January 7, 2018 19:12 — forked from kafene/gpg-wkd.md
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@UshF
UshF / SafariTutorial1.ipynb
Created January 3, 2017 16:44
pub test ipython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am UshF on github.
  • I am ushf (https://keybase.io/ushf) on keybase.
  • I have a public key whose fingerprint is B703 539C 4280 E275 A46E 9BC2 67A0 957F 3D79 DB5A

To claim this, I am signing this object:

@UshF
UshF / gist:b8f45f1b3e56ec8ff44a
Created May 27, 2014 16:54
mininet virtualbox vm dhcp failure due to firewall
/var/log/syslog
[UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:84:c9:b2:d1:fc:a7:08:00 SRC=192.168.0.1 DST=224.0.0.1 LEN=28 TOS=0x00 PREC=0xC0 TTL=1 ID=58423 PROTO=2
May 27 12:19:56 ushATT kernel: [ 2790.682707] [UFW BLOCK] IN=virbr0 OUT= MAC=01:00:5e:00:00:01:66:a4:86:cb:16:ba:08:00 SRC=0.0.0.0 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2
1. Edited ufw rules, to allow this from the 192.168.0.0/16 range
That still didn't do it
2. Manually in virtualbox File>Preferences>Network>Host-only>Adapter>IP4 x.y.z.w
----------------------------------------------------------DHCP> set to same IP x.y.z.w
@UshF
UshF / gist:36e247b7da8f387ebe52
Last active August 29, 2015 14:01
mininet wireshark error in default vm
Per: http://mininet.org/walkthrough/#start-wireshark
[1] 1543
mininet@mininet-vm:~$ Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Then wireshark fires up with a pop-up error message as follows:
Lua: Error during loading:
[string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
#!/bin/bash
set -e # exit on error
### README
# * installs your desired ruby versions using rbenv
# ** including openssl (needed by bundler)
# ** including sqlite (probably needed for rails apps)
#
# Before you start:
# * put ssh-keys in place
yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd /usr/local
git clone git://github.com/sstephenson/rbenv.git rbenv
mkdir rbenv/shims rbenv/versions
chgrp -R groupname rbenv
chmod -R g+rwxXs rbenv
git clone git://github.com/sstephenson/ruby-build.git ruby-build
cd ruby-build
./install.sh
require 'fog'
require 'net/ssh'
require 'net/scp'
def upload_file(host, user, password, source, dest, print_progress = true)
Net::SSH.start(host, user, :password => password) do |ssh|
puts "Uploading file... (#{File.basename(source)})"
ssh.scp.upload!(source, dest) do |ch, name, sent, total|
if print_progress
#!/usr/bin/env bash
#
# Copyright 2011, AT&T Services, Inc.
#
# All rights reserved - Do Not Redistribute
#
# Next we have to fix udev. Since all of our hardware is the same, we can do it this way to make sure all deviceds are always the same
cat <<EOF >/etc/udev/rules.d/70-persistent-net.rules
# This file was generated by cede.