Skip to content

Instantly share code, notes, and snippets.

View alex's full-sized avatar

Alex Gaynor alex

View GitHub Profile
@alex
alex / keybase.md
Last active August 29, 2015 13:57

Keybase proof

I hereby claim:

  • I am alex on github.
  • I am alex_gaynor (https://keybase.io/alex_gaynor) on keybase.
  • I have a public key whose fingerprint is E27D 4AA0 1651 72CB C5D2 AF2B 125F 5C67 DFE9 4084

To claim this, I am signing this object:

diff -r 1bc0a8310b9f Lib/hashlib.py
--- a/Lib/hashlib.py Thu Apr 17 20:11:19 2014 +0200
+++ b/Lib/hashlib.py Fri Apr 18 17:34:04 2014 -0700
@@ -60,7 +60,7 @@
algorithms = __always_supported
-__all__ = __always_supported + ('new', 'algorithms')
+__all__ = __always_supported + ('new', 'algorithms', 'pbkdf2_hmac')
import socket
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
s.bind(("eth0", 0x88CC))
while True:
print repr(s.recv(8192))
#include <stdlib.h>
#include <sys/types.h>
#include <spawn.h>
#include <stdio.h>
#include <errno.h>
extern char **environ;
int main() {
pid_t pid;
import sys
def key_schedule(key):
S = bytearray(range(256))
j = 0
for i in xrange(256):
j = (j + S[i] + ord(key[i % len(key)])) & 255
S[i], S[j] = S[j], S[i]
return S
FROM ubuntu
ENV LAST_UPDATED 0
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y php5 php5-curl curl
RUN curl -sS https://getcomposer.org/installer | php
@alex
alex / -
Created February 26, 2015 03:18
commit a86d54fa34727c7f91e77f83e6c4e76e7fbd5b5f
Author: Alex Gaynor <alex.gaynor@gmail.com>
Date: Tue Oct 7 21:51:38 2014 -0700
these aren't going to be published
diff --git a/content/drafts/long-live-curl.rst b/content/drafts/long-live-curl.rst
deleted file mode 100644
index d9cf18b..0000000
--- a/content/drafts/long-live-curl.rst
commit a86d54fa34727c7f91e77f83e6c4e76e7fbd5b5f
Author: Alex Gaynor <alex.gaynor@gmail.com>
Date: Tue Oct 7 21:51:38 2014 -0700
these aren't going to be published
diff --git a/content/drafts/long-live-curl.rst b/content/drafts/long-live-curl.rst
deleted file mode 100644
index d9cf18b..0000000
--- a/content/drafts/long-live-curl.rst
@alex
alex / -
Created March 1, 2015 20:14
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 0e6abda..f28979a 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2218,6 +2218,8 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
SSL_CTX_set_session_id_context(self->ctx, (const unsigned char *) SID_CTX,
sizeof(SID_CTX));
#undef SID_CTX
+ X509_STORE *store = SSL_CTX_get_cert_store(self->ctx);
+ X509_STORE_set_flags(store, X509_V_FLAG_TRUSTED_FIRST);
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 0e6abda..f28979a 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2218,6 +2218,8 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
SSL_CTX_set_session_id_context(self->ctx, (const unsigned char *) SID_CTX,
sizeof(SID_CTX));
#undef SID_CTX
+ X509_STORE *store = SSL_CTX_get_cert_store(self->ctx);
+ X509_STORE_set_flags(store, X509_V_FLAG_TRUSTED_FIRST);