Skip to content

Instantly share code, notes, and snippets.

@suligap
Last active October 21, 2021 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suligap/5ef9e985ec31b2e0cd5eaf6356394044 to your computer and use it in GitHub Desktop.
Save suligap/5ef9e985ec31b2e0cd5eaf6356394044 to your computer and use it in GitHub Desktop.
#!/bin/bash
# A local sentry "server" to debug raven client configs against. Set your
# SENTRY_DSN to for example http://a:b@localhost:9797/x and run this to view
# arriving JSON messages.
while true; do
echo '----------------- Start ----------------------------'
echo -e 'HTTP/1.1 200 OK\n\n' \
| netcat -l 9797 \
| tail -n +11 \
| python3 -c 'import sys,zlib; print(zlib.decompress(sys.stdin.buffer.read()).decode())' \
| jq .
echo '----------------- End ------------------------------'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment