Skip to content

Instantly share code, notes, and snippets.

Chris Wolfe derwolfe

Block or report user

Report or block derwolfe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:aaa1af11df5cdc61fb153b813b775f8c
> There's two routes I see to making our system resilient.
There are two routes...
> And of course they nothing in this attack 
And of course they do nothing ...
@derwolfe
derwolfe / server.tac
Created Jul 31, 2017
twisted site with HSTS
View server.tac
import os
import pem
from twisted.application.service import Application
from twisted.application.internet import (
TCPServer,
SSLServer
)
@derwolfe
derwolfe / req_bench.py
Last active Mar 29, 2017
requests/treq work
View req_bench.py
from __future__ import print_function
"""
The "tests" here are intended to be used as benchmarks to help in performance
optimization.
"""
from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
from time import time
View gist:b917892855bf80fb31c4b86d8a31c496
> create table spam(spot inet[]);
> insert into spam values (ARRAY['192.168.1.1'::inet]);
> account_service=> select * from spam;
spot
---------------
{192.168.1.1}
@derwolfe
derwolfe / main.py
Created Jan 10, 2017
example of twisted web
View main.py
from twisted.internet import reactor
from twisted.web.server import Site
from twisted.web.resource import Resource
class Page(Resource):
def render_GET(self, request):
return "hi".encode('utf-8')
View deferreddump.py
"""
Dump current deferred state.
> Anyway, given a tree of deferreds, this will produce a whatever.dot
> file, which can be fed to graphviz' "dot -Tpdf whatever.dot >
> whatever.pdf", >and the pdf has a rather nice-looking graph of the
> deferreds.
http://twistedmatrix.com/pipermail/twisted-python/2012-July/025867.html
View keybase.md

Keybase proof

I hereby claim:

  • I am derwolfe on github.
  • I am derwolfe (https://keybase.io/derwolfe) on keybase.
  • I have a public key whose fingerprint is A274 2664 0C95 BAF9 A452 E51C BC97 2703 EE6A 93EC

To claim this, I am signing this object:

View key-cycle-msg.txt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I am cycling my GPG key.
My old key has fingerprint:
B256 481D 41F3 7AF2 29C2 A3D2 A008 BD38 361C 4770
My new key has fingerprint:
@derwolfe
derwolfe / requirements.txt
Last active Mar 30, 2016
klein capture error routes
View foo.clj
cloudpassage-reporter.core> (defn record-my-actions [fn & args]
(str (resolve (quote fn)) " args:" args))
#'cloudpassage-reporter.core/record-my-actions
cloudpassage-reporter.core> (record-my-actions count 1 2 3)
"#'clojure.core/fn args:(1 2 3)”
You can’t perform that action at this time.