Skip to content

Instantly share code, notes, and snippets.

💎
Dabbling with the Spigot API making some neat plugins for personal use.

Jacob Birkett spikespaz

💎
Dabbling with the Spigot API making some neat plugins for personal use.
Block or report user

Report or block spikespaz

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
View Python_Snippets.md

Python Snippets

Blocks of code that may become useful later.

@spikespaz
spikespaz / EmbedJS.md
Last active Feb 20, 2018
JavaScript include that converts all anchor elements with the "--embed" class into highlighted code blocks (http://embed.spikespaz.com)
View EmbedJS.md

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.

You can’t perform that action at this time.