Skip to content

Instantly share code, notes, and snippets.

View mamacdon's full-sized avatar

Mark Macdonald mamacdon

  • Ottawa, Canada
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mamacdon on github.
  • I am mamacdon (https://keybase.io/mamacdon) on keybase.
  • I have a public key ASDovqewrPovMp6m0lxt26gXmNUKy87cUaIns5J7S__HlAo

To claim this, I am signing this object:

@mamacdon
mamacdon / index.html
Created July 24, 2015 15:24
Orion validator example
<!DOCTYPE html>
<html>
<head>
<title>Validator example</title>
<script src="https://orion.eclipse.org/orion/Deferred.js"></script> <!--must be loaded before plugin-->
<script src="https://orion.eclipse.org/orion/plugin.js"></script> <!--must be loaded before script tag -->
<script>
/*global orion Deferred*/
var provider = new orion.PluginProvider();
provider.registerServiceProvider("orion.edit.validator", {
{
"passes": 1715,
"tests": 1715,
"end": {},
"suites": 57,
"url": "/js-tests/javascript/JsMochaSuite.html",
"reports": [],
"start": {},
"xunit": "H4sIAAAAAAAAA92da5PbRpamv8+vQHsntuzeYVtVpat7NLGyLI21q0uvSm1/mNjQgESShAUCNC516Y7+75sXAMwEEmQC+R6UdsIR3aoi63nzcvLkyfu/lqwoiyouWZCGO/b8m3fZahsGn8Rvvwnkh8+/OX9y/uibYB3GSZUz/vODbwKW51mu/ll8ifd7Fsl/l/GO/0m42z//5lcW/Uvw4GHwLsyDiwfnj4LzZz9cPvnh/EHw7+8+qW+KP/m3f/pXobIKCxaskrAoVDJeFfs83vGEZAnLw7QM/hLmRZxumpSpb+35L1keFNusSqLgJsu/BDdblgarMElYFBTsmv9xolLVSv7pwYPzb7730s3ZKuPou2AZFvEqkMnQ+Zco/iKIsjJYZ0mS3fAMLe+CVx9eI3PyukpXZZylQZhviuBCR19A0ZdI9DLPvvBqDtclr31RQuekdGix9OiXyPrs00NS/ENaOm3iH5HSHyPpq2y3r0ruAnZst+QC7HbPXXHBm1fxCOl5jug8RraCOL0Ok9gic44stUGVi1lUoC27bD7d15+uG/8KdX7DMtAyG5aZqdCgjmtYBupihmWgvmZY5sk8Mk+RHm1Y5tkhCiVrmg+gncDdKmFmO/QtnXgd7OJC/v4705FAydAIyiBD40qD/BBlHjdxubWWMpZ7QcTVS/j8KZYN9cI325g3D4qC7oChPWEXDu3/unCYTa+zfMhx+DZCEw0taxMNLekoW5DZn4UNa+zZ8rdgn2f7II4Y/44286B+kaXJHb1WEpdypsaiCagblzwG0jPtMzF7tUzYPPL9bBMmI+U/8IHdcGrqL9DUgav6fVlCUa1WYtR2zXD
@mamacdon
mamacdon / gist:a90b8870ea1c03a5d38f
Created September 30, 2014 14:24
Object references with orion.core.blame
pluginProvider.registerService("orion.core.blame", {
computeBlame: function(editorContext, options) {
var serverPromise = new Deferred();
// .. resolve serverPromise somehow
return serverPromise.then(function(serverResult) {
var promise = editorContext.setStatus({ Severity: "Error", Message: "File is not connected to SCM" });
});
}
}, {
// ==UserScript==
// @name Disable keyboard shortcuts
// @description Stop websites from highjacking keyboard shortcuts
//
// @run-at document-start
// @include *
// @grant none
// ==/UserScript==
keycodes = [191] // Keycode for '/', add more keycodes to disable other key captures
@mamacdon
mamacdon / js_zip_libs
Created May 14, 2014 15:29
JS zip libs
[gzip-js](https://github.com/beatgammit/gzip-js)
================================================
* Implementation of gzip
* Does not expose underlying deflate algorithm
* Very limited
* Most recent commit ~1 year ago
[pako](http://nodeca.github.io/pako/)
=====================================
* zlib implementation: deflate, inflate, etc.