Skip to content

Instantly share code, notes, and snippets.

View whitmer's full-sized avatar

Brian Whitmer whitmer

View GitHub Profile

Keybase proof

I hereby claim:

  • I am whitmer on github.
  • I am whitmer (https://keybase.io/whitmer) on keybase.
  • I have a public key whose fingerprint is CDFD 52A0 2BA0 6D23 6DB0 277B 8C11 5CE3 5E3E 2EBE

To claim this, I am signing this object:

@whitmer
whitmer / gist:6010232
Last active December 19, 2015 19:59
Modified version of canvabadges embed code that should work, even if pasted into another script file.
// --- Canvas Profile Badges ---
$(function() {
var protocol_and_host = "https://canvabadges.herokuapp.com";
var $scripts = $("script");
var match = location.href.match(/\/users\/(\d+)$/);
if(match && protocol_and_host) {
var user_id = match[1];
var domain = location.host;
var url = protocol_and_host + "/api/v1/badges/public/" + user_id + "/" + encodeURIComponent(domain) + ".json";
$.ajax({