Skip to content

Instantly share code, notes, and snippets.

@RoboSparrow
RoboSparrow / Now() in different formats.markdown
Last active January 6, 2016 12:06
Now() in different formats
@RoboSparrow
RoboSparrow / xAPI-xhr-statement.html
Last active September 16, 2016 08:18
Simple xAPI XMLHttpRequest example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>XHR lxHive</title>
</head>
<body>
<p>Sending a statement to <strong id="Endpoint"></strong></p>
@RoboSparrow
RoboSparrow / getStatements.html
Last active August 29, 2015 14:07
Asynchronous xAPI call example
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="https://raw.githubusercontent.com/adlnet/xAPIWrapper/master/xapiwrapper.min.js"></script>
</head>
<body>
<script>
/**
* Example of wrapping ADL.XAPIWrapper.getStatements into a flexible asynchronous pattern.
* It allows both the use of ES-6 promises or traditional callbacks.