Skip to content

Instantly share code, notes, and snippets.

View berlincount's full-sized avatar
🤵‍♂️
Some men just want to see the world turn.

Andreas 'count' Kotes berlincount

🤵‍♂️
Some men just want to see the world turn.
View GitHub Profile
@berlincount
berlincount / http-server.py
Last active December 20, 2022 21:22
Twisted HTTP server example
#!/usr/bin/env python
from twisted.web import server, resource
from twisted.internet import reactor, defer
from pprint import pprint
import base64
class DummyServer(resource.Resource):
isLeaf = True
@berlincount
berlincount / http-client.py
Created March 23, 2015 12:53
Twisted HTTP client example with parallel requests, timeouts and authentication
#!/usr/bin/env python
from twisted.internet import defer, reactor
from twisted.internet.protocol import Protocol
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
def run():
# create some requests for parallel execution

Keybase proof

I hereby claim:

  • I am berlincount on github.
  • I am count (https://keybase.io/count) on keybase.
  • I have a public key ASAfuIjyboHa-sk-IipIlxdm_iCmkXmrI9YRFcf5dVAe4go

To claim this, I am signing this object:

@berlincount
berlincount / vimrc
Last active May 12, 2017 16:30
vimrc
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
set bs=2
set backup
set viminfo='20,\"50
set history=100
set ruler