Skip to content

Instantly share code, notes, and snippets.

View iturgeon's full-sized avatar
👻
The answer is YES

Ian Turgeon iturgeon

👻
The answer is YES
View GitHub Profile
@iturgeon
iturgeon / build.xml
Created July 17, 2018 23:58
Flex mxml ant build script including working framework RSLs
<?xml version="1.0"?>
<!-- FROM http://soenkerohde.com/2008/04/using-the-flash-player-cache-for-the-flex-framework/ http://soenkerohde.com/flex/build.xml -->
<project name="AntExample" default="build" basedir=".">
<!-- property has to be name FLEX_HOME to work with Flex Ant Tasks -->
<property name="FLEX_HOME" value="D:/tools/moxie/sdks/3.0.0" />
<!-- this is default and redundant but you could switch to a custom flex-config.xml -->
<property name="flex.config" value="${FLEX_HOME}/frameworks/flex-config.xml" />
@iturgeon
iturgeon / checksum.js
Last active February 7, 2019 20:31
Node cli script to create checksums of a file
#!/usr/bin/env node
// output a file checksum using crypto
// Ex call: ./checksum.js md5 package.json
const hash = require('crypto').createHash(process.argv[2]).setEncoding('hex')
require('fs').createReadStream(process.argv[3]).pipe(hash.on('finish',() => {console.log(hash.read())}))
@iturgeon
iturgeon / notes.md
Created August 6, 2020 18:12
Instructure Canvas LTI Scores for complete / incomplete

LTI scores passed back to assignments that are implemented as commplete/incomplete need to return 100% to canvas to be counted as complete.

This isn't really inherent in the naming of complete / incomplete. It's also difficult to find information on it, so I made this note for myself in the future and anyone else that may run into it.

@iturgeon
iturgeon / dispatch-close-now.js
Last active August 14, 2020 18:34
Jest Test Exercise - Unreachable internal variables
import Dispatcher from './dispatcher'
// scoped to this file, not accessable outside
// used in the real world to prevent sending a
// window close tracking api request twice
let closeNowTriggered = false
const dispatchCloseNow = () => {
if (!closeNowTriggered) {
Dispatcher.trigger('window:closeNow')