Skip to content

Instantly share code, notes, and snippets.

James Harrison Fisher jameshfisher

Block or report user

Report or block jameshfisher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jameshfisher / stravaBug.js
Created Oct 13, 2018
Demonstration that Strava Route Builder can't find routes at the prime meridian
View stravaBug.js
// Open, then copy/paste this code in the debug console.
// It should print results like this, showing that it can't find routes at the prime meridian:
// lng: -1.0, errCount: 0
// lng: -0.9, errCount: 0
// lng: -0.8, errCount: 1
// lng: -0.7, errCount: 0
// lng: -0.6, errCount: 0
// lng: -0.5, errCount: 0
// lng: -0.4, errCount: 0
View gctest.dats
* to compile:
* $ patscc -DATS_MEMALLOC_LIBC gctest.dats
* NOTE: no GC here

Keybase proof

I hereby claim:

  • I am jameshfisher on github.
  • I am jameshfisher ( on keybase.
  • I have a public key ASCYA1n1SBL09gPSYAODwLrEM29WPBhIc-z7hPGU5t2eIwo

To claim this, I am signing this object:

jameshfisher /
Last active Aug 29, 2015
One Game a Month plans

Non-Euclidean sokoban

Just like sokoban, except instead of being played on a 2d grid, it is played on graph-like structures with strange topologies (e.g. loops, mobius strips).


Player must create as random a sequence as possible using the keyboard. Randomness is rewarded by pictures of random stuff.

jameshfisher / NonMonadicIO.hs
Created Jan 6, 2015
Non-monadic IO in Haskell
View NonMonadicIO.hs
module NonMonadicIO where
import GHC.Base (returnIO, bindIO)
-- The IO API:
-- returnIO :: a -> IO a
-- bindIO :: IO a -> (a -> IO b) -> IO b
-- Here's a program which does nothing:
jameshfisher / gist:77799ca0d96f5d475f1e
Created Dec 22, 2014
Elm: Wrong HTML element disappears in state transition
View gist:77799ca0d96f5d475f1e
<html><head><meta charset="UTF-8"><title>Compiled Elm</title><style>html,head,body { padding:0; margin:0; }
body { font-family: 'Lucida Grande','Trebuchet MS','Bitstream Vera Sans',Verdana,Helvetica,sans-serif; }
a {
color: #1184CE;
text-decoration: none;
a:hover {
text-decoration: underline;
color: rgb(234,21,122);
jameshfisher /
Last active Aug 29, 2015
Splunk Enterprise download URLs

i.e. take the file argument and prefix it with

Works for:

  • 6.1.2/splunk/linux/splunk-6.1.2-213098-linux-2.6-x86_64.rpm
  • 6.1.2/universalforwarder/linux/splunkforwarder-6.1.2-213098-linux-2.6-x86_64.rpm
  • ...
jameshfisher /
Created Apr 12, 2014
Restore a file from the package that provides it.
# Usage:
# sudo ./ <filepath>
# Restore a file from the package that provides it.
# Source:
jameshfisher /
Last active Jan 4, 2016
ORM correctness constraints

ORM correctness constraints

At an old workplace, we used the Hibernate ORM to map a class hierarchy to our relational database. Hibernate represents a class hierarchy in the following way. Let's say we have the tables:

abstract class A
class B extends A
class C extends A
View How to make a private Gist

Github provides no facility to do this via the UI. This is sad, because it would be extremely useful in order to draft something before publishing it. It would also be trivial for them to implement. Never mind; here's how to do it manually:

  1. Get the "Clone this Gist" text from the left-hand side of the private Gist, e.g., and extract the ID b9cc265982870c091a1e.
  2. Go to and create a dummy new public Gist.
  3. Get the "Clone this Gist" text from the left-hand side, e.g., and extract the ID 8270253.
  4. git clone tmp-dir && cd tmp-dir && git push -f
You can’t perform that action at this time.