Skip to content

Instantly share code, notes, and snippets.

hjwp / default-acl.json
Last active May 4, 2020
Eventstore perms bug repro
View default-acl.json
"eventId": "7c314750-05e1-439f-b2eb-f5b0e019be72",
"eventType": "update-default-acl",
"data": {
"$userStreamAcl" : {
"$r" : ["$admin", "$ops", "test-user"],
"$w" : ["$admin", "$ops", "test-user"],
"$d" : ["$admin", "$ops"],
"$mr" : ["$admin", "$ops"],
"$mw" : ["$admin", "$ops"]
def foo() -> int:
return 42
hjwp /
Last active Nov 23, 2019
Bowling TDD Kata
def score_frame(frame, next_frame):
if frame[:2] == STRIKE:
if next_frame == STRIKE:
return 20
if next_frame is LAST_FRAME:
first_ball_next_frame = int(frame[2])
second_ball_next_frame = int(frame[3])
hjwp /
Last active Feb 14, 2019
sqlalchemy mapping minimal example
'''stripped-down domain model, just order and warehouse'''
from __future__ import annotations
from dataclasses import dataclass
class Line:
sku: str
qty: int
View Dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -y -q python3.7 python3.7-dev python3-pip git
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
RUN pip3 install pip pipenv
View index.html
<title>Hello, Greetings</title>
hjwp /
Created Jul 7, 2018
More Python and Django resources

Introductions to Python

In case some people don't get on well with the pluralsight course, there's a wealth of free Python resources out there. See the list on the /r/learnpython wiki:

I personally learned from "Dive into Python" which I recommend, it's nice and fast paced, aimed at people who already know programming in another language, and is linked there.


Keybase proof

I hereby claim:

  • I am hjwp on github.
  • I am hjwp ( on keybase.
  • I have a public key ASCDSKFHU12BdBf8anQUt_MjeXUbDrPT8W1GjWbhRpa-QQo

To claim this, I am signing this object:

hjwp /
Created Oct 13, 2017
a tiny thing
print('i am file 1')
You can’t perform that action at this time.