Skip to content

Instantly share code, notes, and snippets.

View jpjones76's full-sized avatar

Joshua Jones jpjones76

View GitHub Profile
@jpjones76
jpjones76 / zork.sh
Last active February 6, 2023 16:18
For a more immersive Zork experience...
#!/bin/bash
# INSTRUCTIONS
# (0) Save this file as zork.sh
# (1) Change SRCDIR, ZILF, and DOTNET for your system
# (2) Add to path with "source ./zork.sh"
# (3) Now you can have the true Zork experience while installing it! Try it!
#
# get zilf
# build zilf
@jpjones76
jpjones76 / set_useragent.jl
Last active August 29, 2020 06:00
Workaround for "500 Internal Server Error" returned by FDSN requests to California servers
# THE ISSUE: HTTP "500 Internal Server Error" for FDSN requests to California
# earthquke data centers (NCEDC, SCEC/SCEDC).
#
# THE CAUSE: against HTTP "best practices", and seemingly against common sense,
# California FDSN servers only accept requests from a small whitelist of
# user agents. Neither Julia nor SeisIO is on their lists, so SeisIO must
# emulate a web browser in the User Agent setting to be able to connect. This
# creates a sort of "arms race" wherein the User Agent value in SeisIO.webhdr
# must be updated whenever a web browser releases a new version. This is a
# complete waste of everyone's time: theirs, yours, and mine.