Skip to content

Instantly share code, notes, and snippets.

@chrisguidry
chrisguidry / stream_subscriber.py
Last active August 16, 2023 01:59
Stream the events from a Prefect Cloud workspace over Websockets
from uuid import UUID
import orjson
import pendulum
import rich.console
from websockets.client import connect
from websockets.exceptions import ConnectionClosedError
from prefect.cli import root
from prefect.cli._types import PrefectTyper
@thefotios
thefotios / emojify.sh
Created July 21, 2015 20:30
Makes properly sized emoji for slack. Just point this at any URL. You'll need to have `convert` (part of ImageMagick)
#!/usr/bin/env bash
url=$1;
output=${2-output.png};
size=${3-128};
curl --silent -kL $url | convert - -resize ${size}x${size} $output;