Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖

Johannes johtso

🤖
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am johtso on github.
  • I am johtso (https://keybase.io/johtso) on keybase.
  • I have a public key whose fingerprint is 480D 27DC 20A4 E61E F849 037C 581B 992E 7F19 4964

To claim this, I am signing this object:

View gist:d0b9111f7c28232eb86a
getdirentries64(0x6, 0x7FD7728E2A00, 0x1000) = 1192 0
close_nocancel(0x6) = 0 0
fstat64(0x5, 0x7FFF50CE06D0, 0x1000) = 0 0
fstat64(0x5, 0x7FFF50CE0720, 0x1000) = 0 0
open_nocancel("/Users/human/.virtualenvs/main/lib/python2.7/site-packages/salt/renderers/mako.pyc\0", 0x0, 0x1B6) = 6 0
fstat64(0x6, 0x7FFF50CE04F8, 0x1B6) = 0 0
read_nocancel(0x6, "\003\363\r\nK\2012Tc\0", 0x1000) = 1282 0
fstat64(0x6, 0x7FFF50CE0608, 0x1000) = 0 0
read_nocancel(0x6, "\n .hostmask: IPv4Address('0.0.0.31')\n .broadcast: IPv4Address('1.2.3.31')\n .netmask: IPv4Address('255.255.255.224')\n .prefixlen: 27\n\n i\377\0", 0x1000) = 0 0
close_nocancel(0x6) = 0 0
@johtso
johtso / tott_rate_monitor.py
Created May 27, 2016
Output counts of URLs scanned on URLTeam project
View tott_rate_monitor.py
import sys
import json
import websocket
ws = websocket.create_connection('ws://tracker.archiveteam.org:1337/api/live_stats')
username = sys.argv[1]
while True:
data = json.loads(ws.recv()).get('live_new')
View generator_decorator.py
import inspect
from typing import Callable, Generator, Awaitable, TypeVar, Union
YieldType = TypeVar("YieldType")
SendType = TypeVar("SendType")
ReturnType = TypeVar("ReturnType")
def friendly_generator_decorator(
genfunction: Callable[..., Generator[YieldType, SendType, ReturnType]],
handler: Callable[[YieldType], Union[Awaitable[SendType], SendType]],