Skip to content

Instantly share code, notes, and snippets.

View jbasdf's full-sized avatar

Justin Ball jbasdf

View GitHub Profile
{"keys":[{"kty":"RSA","e":"AQAB","n":"1YVj2KgGA0MKzQddETHX8XaUWK6qlERjqnaDZeUbPnGov3jjpUFTRft9z4w2KA7WpXEpEI0QGOf5j9ZSG0vFpGecXUJZyktoD9gWT3XzRpfWI0FjL0xbZHcVt8Fs683zNVrGkVX23lH5QO53iQdqQbN9swrH0mWljx6W7M6ITdy8fWd04s7UXIAPvtVn6KO-bmjx1nCnTeTZiNNkYSMtx2oGgCoFnFbXghNT-n0VPCK6XvOpnHDCl17-BmF8AT9rJsTGy_S402FxePr-pzdRYSwyvRDTL8RJ5HBannvFUC4Qn5rUD6E9bxdNSiSexKd60Nne_54zMu08We9kIGjRdQ","kid":"tT0OmDOGuMRotgMyawCtHYtKIjkFnBet8KBoIb9lDiE","use":"sig","alg":"RS256"}]}
@jbasdf
jbasdf / canvas_lti_variables
Created November 11, 2017 00:49
All Canvas LTI Variables for substitution
context_title: "$Context.title",
com_instructure_post_message_token: "$com.instructure.PostMessageToken",
com_instructure_assignment_lti_id: "$com.instructure.Assignment.lti.id",
com_instructure_originality_report_id: "$com.instructure.OriginalityReport.id",
com_instructure_submission_id: "$com.instructure.Submission.id",
com_instructure_file_id: "$com.instructure.File.id",
course_offering_sourced_id: "$CourseOffering.sourcedId",
context_id: "$Context.id",
context_sourced_id: "$Context.sourcedId",
message_document_target: "$Message.documentTarget",
@jbasdf
jbasdf / gist:e87baacd8e59007e8d2798cfed0368d2
Created November 18, 2021 20:37
Atomic Polls LTI Advantage JSON
{
"title": "Atomic Polls",
"scopes": [
"https://purl.imsglobal.org/spec/lti-ags/scope/lineitem",
"https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly",
"https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly",
"https://purl.imsglobal.org/spec/lti-ags/scope/score",
"https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly",
"https://canvas.instructure.com/lti/public_jwk/scope/update"
],
@jbasdf
jbasdf / gist:74189ef34450631658a5ff5ba68603d2
Created November 18, 2021 20:33
Atomic Journals LTI Advantage JSON
{
"title": "Atomic Journals",
"scopes": [
"https://purl.imsglobal.org/spec/lti-ags/scope/lineitem",
"https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly",
"https://purl.imsglobal.org/spec/lti-ags/scope/score",
"https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly",
"https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly"
],
"extensions": [
@jbasdf
jbasdf / chosen.jquery.js
Created October 10, 2013 15:40
Chosen modified to provide a clean search text callback.
// Chosen, a Select Box Enhancer for jQuery and Prototype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 1.0.0
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `grunt build`, do not edit it by hand.
(function() {
@jbasdf
jbasdf / ec2nuke.sh
Last active December 10, 2018 05:13
AWS EC2 Nuke
# !!!!!!!!!!!!!!!!! WARNING - Use this script at your own risk. !!!!!!!!!!!!!!!!!!!!!!!
# In the event that you need to clean out your AWS account you can use the following script to wipe out all EC2 instances and their
# related data.
# This script terminates all running EC2 instances in your account, removes the images, removes all EBS volumes and removes snapshots.
# You will need to run this with a user that has appropriate rights.
for region in us-east-2 us-east-1 us-west-1 us-west-2 ca-central-1 eu-central-1 eu-west-1 eu-west-2 ap-northeast-1 ap-southeast-1 ap-southeast-2 ap-south-1 ap-northeast-2 sa-east-1; do
echo $region
@jbasdf
jbasdf / inactivity-warning.js
Created January 2, 2014 23:14
Javascript for Ember inactivity component
App.InactivityWarningComponent = Ember.Component.extend({
active: false,
inactiveTimeout: 12000000, // Amount of time before we redirect to the sign in screen - the session should have expired by this point. (20 minutes)
warningTimeout: 30000, // Amount of time the user has to perform an action before the last keep alive fires - 30 seconds
timeout: 1170000, // 19.5 minutes. We want to be less than the 20 minute timeout to be sure the session is renewed.
didInsertElement: function(){
//if($('meta[name="in-development"]').attr('content')){ return; } // Uncomment and add a meta tag to your head if you want to avoid session timeout in development
var context = this;
@jbasdf
jbasdf / serverless.yml
Last active August 23, 2016 22:38
serverless.yml that includes JSON-REF for creating dynamo db tables
service: lti
provider:
name: aws
runtime: nodejs4.3
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:Scan"
- "dynamodb:Query"
- "dynamodb:DescribeStream"
@jbasdf
jbasdf / dynamodb.json
Created August 23, 2016 22:37
dynamodb.json - cloud formation partial for creating dynamodb tables
{
"Applications" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"TableName" : "Applications-${stage}",
"AttributeDefinitions": [ {
"AttributeName" : "name",
"AttributeType" : "S"
} ],
"KeySchema": [
@jbasdf
jbasdf / inactivity-warning.hbs
Created January 2, 2014 23:09
Handlebars template for Ember inactivity warning component.
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button {{action 'close'}} type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="tmModalLabel">Inactivity Warning</h4>
</div>
<div class="modal-body">
You will be logged out in 30 seconds.
</div>