Skip to content

Instantly share code, notes, and snippets.

View novakda's full-sized avatar
🎯
Focusing

Dan Novak novakda

🎯
Focusing
  • Portland, OR
  • 19:52 (UTC -07:00)
View GitHub Profile
digraph G {
label="Efficient Soil to Resource Processing"
rankdir=LR;
subgraph cluster_0 {
Hydrogen
Argon
Methane
@novakda
novakda / scormCloudDebugLogToQunitTests.js
Created September 6, 2018 21:00
Parse a SCORM Cloud debug log and generate QUnit assert statements
var scormLog = Array.from(document.querySelectorAll('div.runtime')).map(function (line) {
var tmp = line.innerText.trim().split(']');
var timeStamp = tmp[0].split('[')[1].trim();
var tmp2 = tmp[1].trim().split(' returned ');
var scormCall = tmp2[0].trim();
var returnVal = tmp2[1].trim().split(' in ')[0].trim();
var elapsed = tmp2[1].trim().split(' in ')[1].trim();
return {
scormCall: scormCall,
timeStamp: timeStamp,
@novakda
novakda / scorm2004getinteractions.js
Created June 8, 2018 18:15
Dump SCORM 2004 interaction data to JS Object
(function () {
// interactionstatetojson
// get interaction count
var interactionCount = API_1484_11.GetValue("cmi.interactions._count");
if ( interactionCount ) {
interactionCount = interactionCount * 1; // toNumber
console.log(interactionCount);
}
@novakda
novakda / redate.sh
Created July 31, 2017 05:51
Change dates of all files to one day apart, in file order
IX=0
for f in *.*
do
THEDATE=$(date -d "-$IX days" +%m%d%H%M)
echo "Processing $IX) [$THEDATE] $f file.."
let IX=${IX}+1
touch -t ${THEDATE} "${f}"
done