Skip to content

Instantly share code, notes, and snippets.

View cybercussion's full-sized avatar

Mark Statkus cybercussion

View GitHub Profile

General Tips for CloudFront + S3 for Static Sites or going "headless"

This assumes you've setup a AWS Account and logged into the AWS Console. Any one new to AWS there is also a CLI available. AWS will give you a root AccessKey and Token, and from that point forward you can configure users through IAM.

Important things to note since there is a order/method to your setup. Do things out of order and it may require you to Invalidate paths since CloudFront will cache your site in edge locations. You are allowed 2000 path updates until they start charging you. So if you have a ton of files, use that feature sparingly. What gets cached?

@cybercussion
cybercussion / index.html
Last active August 21, 2017 21:29
Merge Test #jsbench #jsperf (http://jsbench.github.io/#97fdf75b8411c5d528b033114e35d73f) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Merge Test #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@cybercussion
cybercussion / config.js
Last active August 29, 2015 14:12
Sample RequireJS setup with some light failover for CSS.
/*global requirejs, define, require, CI, $, jQuery */
/*jslint devel: true, browser: true */
/**
* Require Config
* This is all the core scripts needed to be available at runtime.
* Includes CDN and local file fail over.
* Shim will control the availability of dependent libraries/scripts.
* domReady included to insure it all kicks off right.
* @usage <script data-main="js/config" src="js/vendor/requirejs/require.min.js"></script>
*/
[
{
"name": "imsmanifest.xml"
},
{
"contents": [
{
"contents": [
{
"contents": [
@cybercussion
cybercussion / gist:11192402
Last active August 29, 2015 14:00
Prerequisite style imsmanifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_v1p3" xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
xmlns:adlnav="http://www.adlnet.org/xsd/adlnav_v1p3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:adlseq="http://www.adlnet.org/xsd/adlseq_v1p3" xmlns:lom="http://ltsc.ieee.org/xsd/LOM"
xmlns:imss="http://www.imsglobal.org/xsd/imsss"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd http://www.adlnet.org/xsd/adlcp_v1p3 adlcp_v1p3.xsd http://www.adlnet.org/xsd/adlseq_v1p3 adlseq_v1p3.xsd http://www.adlnet.org/xsd/adlnav_v1p3 adlnav_v1p3.xsd http://www.imsglobal.org/xsd/imsss imsss_v1p0.xsd http://ltsc.ieee.org/xsd/LOM lom.xsd"
identifier="ims_sequencing_objectives" version="1.0.0" xmlns="http://www.imsglobal.org/xsd/imscp_v1p1">
<metadata>
<schema>ADL SCORM</schema>
<schemaversion>2004 3rd Edition</schemaversion>
@cybercussion
cybercussion / gist:4675334
Last active May 17, 2023 16:06
This is a more full sample of a SCORM 2004 Learner Attempt with objectives, interactions, comments etc ...
{
"cmi": {
"_version": "1.0",
"comments_from_learner": {
"_children": "comment,location,timestamp",
"_count": "8",
"0": {
"comment": "This is a comment from learner",
"location": "QUnit Test",
"timestamp": "2013-01-28T15:04:39.1-08:00"