Skip to content

Instantly share code, notes, and snippets.

View spikespaz's full-sized avatar
🦀
Science is the scrutiny of magic.

Jacob Birkett spikespaz

🦀
Science is the scrutiny of magic.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am spikespaz on github.
  • I am spikespaz (https://keybase.io/spikespaz) on keybase.
  • I have a public key ASAzP28yonIhOdu2z7XlFOEoqCBqJeyyJ7dNlnbzrTlanAo

To claim this, I am signing this object:

@spikespaz
spikespaz / !PYTHON_SNIPPETS.md
Last active August 25, 2024 14:28
Python Snippets

Python Snippets

A collection of useful code snippets that I have collected over time. They are mostly all written by me.

@spikespaz
spikespaz / !EmbedJS.md
Last active February 18, 2022 02:35
JavaScript include that converts all anchor elements with the "--embed" class into highlighted code blocks (http://embed.spikespaz.com)

EmbedJS

This is a script to embed raw text into a page as highlighted code. It uses ajax requests to fetch the raw content from the URL inside of an anchor element, and then [highlight.js][0] to render the code.

The benefit of this over Github's gist embedding is that it can be used in a full page. If you want to mirror a Gist to [StackOverflow][1] for example, this script can be wrapped inside of a code snippet. Every time the gist that the code snippet points to is updated, the code rendered on StackOverflow will also update.