Skip to content

Instantly share code, notes, and snippets.

Creating jvman, a cross-platform version and environment manager for Java.

Jacob Birkett spikespaz

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

Python Snippets

Blocks of code that may become useful later.

spikespaz /
Last active Feb 20, 2018
JavaScript include that converts all anchor elements with the "--embed" class into highlighted code blocks (


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.

View Microsoft.PowerShell_profile.ps1
Set-PSReadlineOption -BellStyle None
$Projects = $Env:UserProfile + "\Documents\Projects"
$Documents = $Env:UserProfile + "\Documents"
$Music = $Env:UserProfile + "\Music"
$Videos = $Env:UserProfile + "\Videos"
$Downloads = $Env:UserProfile + "\Downloads"
$Pictures = $Env:UserProfile + "\Pictures"
$Desktop = $Env:UserProfile + "\Desktop"
$ProfileDirectory = "$((Get-Item $Profile).Directory.FullName)"
You can’t perform that action at this time.