Skip to content

Instantly share code, notes, and snippets.

View jasonLaster's full-sized avatar

Jason Laster jasonLaster

View GitHub Profile
diff --git a/devtools/client/debugger/new/src/client/firefox.js b/devtools/client/debugger/new/src/client/firefox.js
--- a/devtools/client/debugger/new/src/client/firefox.js
+++ b/devtools/client/debugger/new/src/client/firefox.js
@@ -35,9 +35,7 @@ export async function onConnect(connecti
supportsWasm
});
- if (actions) {
- setupEvents({ threadClient, actions, supportsWasm });
- }
@jasonLaster
jasonLaster / gistbook.json
Created December 13, 2014 02:17
Calculating the norm of a vector in Javascript
{"title":"Calculating the norm of a vector in Javascript","author":"jmeas","pages":[{"pageName":"","sections":[{"type":"text","source":"Determining the norm of a vector can be daunting :fearful: But after you've read this exercise you'll be a pro at it :+1:\n\nThe norm of a vector is its length. In two dimensions, the norm of a vector \\(\\vec{v}\\) can be calculated with the following equation:\n\n$$\\lvert v \\rvert = \\sqrt{x^2+y^2}$$\n\nIn Javascript, we could write a function to calculate this like so:"},{"type":"javascript","source":"var math = require('mathjs');\n\nfunction norm(x, y) {\n return math.sqrt(math.square(x) + math.square(y));\n}"},{"type":"text","source":"Let's take a look at how we can use this to calculate the norm of a vector \\(\\vec{v} = [3, 4]\\)"},{"type":"javascript","source":"var val = norm(3, 4);\n\n// Set it to the output div\ndocument.getElementsByClassName('output')[0].innerHTML = val;"},{"type":"html","source":"<!-- This is a div to show our output -->\n<div>The norm of our
@jasonLaster
jasonLaster / gistbook.json
Last active August 29, 2015 14:06
my cool stuff
{"title":"Lesson 3: Pastafarian Dreadnought Parade","author":"jmeas","updatedAt":"2014-09-03T03:33:49Z","createdAt":"2014-09-02T20:11:40Z","public":true,"pages":[{"pageName":"Some PageName","sections":[{"type":"text","source":"U can use gistbook now omg!!!!!\n\n$$x = 2 + 4$$\n\nThere are also menu options between the blocks to create a new block."},{"type":"javascript","source":"var norm = function(a, b) {\n var obj = {\n name: 'james',\n affil: true\n};"},{"type":"html","source":"<div>hello</div>"}]}],"resources":["http://www.whatever.com/marionette.com"]}
/*
* active-math
* ----------
* A view that lets you view and edit LaTeX blocks
*
*/
var ActiveMathView = Marionette.Layout.extend({
template: gistbookTemplates.activeMath,
define(['jquery', 'backbone', 'marionette'],
function($, Backbone, Marionette){
"use strict";
var MarionetteModule = Marionette.Module;
//create new Marionette constructor
Marionette.Module = function(name, app){
this.name = name;
this.vent = new Backbone.Wreqr.EventAggregator();