Skip to content

Instantly share code, notes, and snippets.


Filippo Valsorda FiloSottile

View GitHub Profile
FiloSottile / gnupg21-pcsc-wrapper-hang.patch
Last active Oct 17, 2015
Tested on GnuPG 2.1.9. Fixes hang when using gpg-agent with YubiKeys on OS X. Port of
View gnupg21-pcsc-wrapper-hang.patch
--- a/scd/apdu.c 2015-10-17 22:25:39.000000000 +0100
+++ b/scd/apdu.c 2015-10-17 22:29:52.000000000 +0100
@@ -29,6 +29,7 @@
#include <string.h>
#include <assert.h>
#include <signal.h>
+#include <pthread.h>
#ifdef USE_NPTH
# include <unistd.h>
# include <fcntl.h>
View gist:567e2b43b051af1c23ed
➜ ~ openssl s_client -servername -connect
depth=1 /C=US/O=DigiCert Inc/ SHA2 High Assurance Server CA
verify error:num=20:unable to get local issuer certificate
verify return:0
Certificate chain
0 s:/C=US/L=San Francisco/ST=California/O=Fastly, Inc./
i:/C=US/O=DigiCert Inc/ SHA2 High Assurance Server CA
1 s:/C=US/O=DigiCert Inc/ SHA2 High Assurance Server CA
FiloSottile / serve-cert.go
Created Apr 6, 2015
A short Go program to serve arbitrary HTTPS certificates for testing
View serve-cert.go
package main
import (
func handler(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-Type", "text/plain")
FiloSottile /
Last active Aug 29, 2015
password-store rekey script
#! /bin/bash
set -euo pipefail
readonly PASSWORD_STORE=~/.password-store
relpath() {
python -c "import os.path; print os.path.relpath('$1','${2:-$PWD}')"
View openssh-6.6p1-hpnssh14v5.diff
diff --git a/HPN-README b/HPN-README
new file mode 100644
index 0000000..7cb3b97
--- /dev/null
@@ -0,0 +1,129 @@
+The AES cipher in CTR mode has been multithreaded (MTR-AES-CTR). This will allow ssh installations
View gist:c002ba7a9855223a795b
rrSets := map[uint16][]dns.RR{}
for _, rr := range r.Response.Answer {
rrtype := rr.Header().Rrtype
set, ok := rrSets[rrtype]
if !ok {
set = []dns.RR{}
rrSets[rrtype] = append(set, rr)
View gist:014127ce8bf88594ec77
// Copyright 2014 CoudFlare. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package dns
import (
View pinentry-mac.rb
require "formula"
class PinentryMac < Formula
head ""
def install
system "make"
prefix.install "build/Release/"
bin.write_exec_script "#{prefix}/"

Keybase proof

I hereby claim:

  • I am FiloSottile on github.
  • I am filippo ( on keybase.
  • I have a public key whose fingerprint is 8CE7 D013 6ABE 132F EC03 D1C9 B8CC 58C5 1CAE A963

To claim this, I am signing this object:

View pgp_verbose_mime.patch
--- a/globals.h 2009-08-25 21:08:52.000000000 +0200
+++ b/globals.h 2010-12-11 13:34:36.934682237 +0100
@@ -227,6 +227,9 @@
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
+/* custom patch */
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
WHERE char *PgpClearSignCommand;