Skip to content

Instantly share code, notes, and snippets.

View jeffgca's full-sized avatar

Jeff Griffiths jeffgca

View GitHub Profile
/**
* Module for using an external editor.
*
* Example where the user will be prompted for the path
* to their editor of choice. The callback is passed the
* entirety of the changed contents, whenever a change is
* detected.
*
* const extEditor = require("ext-editor");
*
@jeffgca
jeffgca / zamboni.diff
Last active December 13, 2015 19:28 — forked from anonymous/gist:4962903
Add support to email all extension developers.
diff --git a/apps/zadmin/forms.py b/apps/zadmin/forms.py
index 366e8af..5395ac2 100644
--- a/apps/zadmin/forms.py
+++ b/apps/zadmin/forms.py
@@ -37,7 +37,8 @@ class DevMailerForm(happyforms.Form):
('payments',
'Developers of non-deleted apps (not add-ons) with payments'),
('desktop_apps',
- 'Developers of non-deleted apps supported on desktop')]
+ 'Developers of non-deleted apps supported on desktop')
const { Cc, Ci } = require("chrome");
const xpcom = require("xpcom");
const { Class } = require("api-utils/heritage");
exports.preventCrossRequest = Class({
extends: xpcom.Unknown,
interfaces: ["nsIContentPolicy"],
shouldLoad: function (contType, contLoc, reqOrig, ctx, typeGuess, extra) {
@jeffgca
jeffgca / devtools-strawman.js
Last active December 11, 2015 03:48 — forked from anonymous/gist:4540452
Some ideas around devtools / Jetpack modules
/**
* an api for adding soemthing to the developer toolbar
*/
var devtool = require('devtools/toolbar').Tool({
label: 'My Dev Tool',
contentURL: self.data.url('index.html'),
contentScritpFile: self.data.url('tool.js')
onOpen: function(worker) {
worker.on('x', y); // etc.
}
@jeffgca
jeffgca / foo.md
Created January 7, 2013 17:56 — forked from janl/gist:4476454
JanD's equality treatise, marked down.

In reply to https://twitter.com/CaseySoftware/status/288324803268579328

We can work at it on all levels. Raise our male kids to see women as equal, get other parents to do the same. Help out in school. Support STEM in school etc.

For JS, we are involved with http://js.opentechschool.org to get newbies going (~50/50 ratio). We are very open and encouraging at @BerlinJS (with varying success, but it is getting better) and we help setting examples at the high end with JSConf EU, who’s CFP has been copied to >10 conferences so far that have used it with success.

There is no one thing is better or we shouldn’t do one because another is better. We need to stop the fucking talking about the effectiveness of any one thing and just pick and do any one of them and hten as much as you can handle and be supportive of others doing the other stuff.

Throwing metaphorical stones at anyone who is doing anything good because you think they should do sometjhing else is the worst thing you can do.

@jeffgca
jeffgca / blurb.md
Last active December 10, 2015 14:28 — forked from anonymous/gist:4447783
Apps hackday Blurb

Mozilla is hosting a free hack day at the HiVE Vancouver on Saturday January 26, to learn, hack and celebrate the Firefox OS, Mozilla's open source operating system for the mobile web.

If you're a web developer, you’ll be right at home coding apps in HTML5, JavaScript and CSS for the Firefox OS. We’ll help you with everything else, including how to access mobile Web APIs and how to use the Firefox OS Simulator in your desktop browser to view and test your mobile apps.

This App Day is not a competition; it's an opportunity to start creating mobile web apps for Firefox Marketplace and the coming Firefox OS phone. It's also a great opportunity to demo your project for an audience of peers, tech leaders and innovators.

Register on Eventbrite: http://firefox-os-vancouver.eventbrite.com/

Promote on Lanyrd:

@jeffgca
jeffgca / cm.js
Last active December 10, 2015 07:28 — forked from anonymous/gist:4401852
Strawman for improving how context-menu works.
var cm = require('context-menu');
var Item1 = cm.Item({
label: 'Label',
image: data.url('image.png')
});
Item1.on('click', function(context) {
// ...
@jeffgca
jeffgca / nativewindow.js
Created November 17, 2012 07:14 — forked from anonymous/gist:4093971
A Jetpack module for mobile
const data = require('self').data;
const menuId;
const utils = require('api-utils/window/utils');
const recent = utils.getMostRecentBrowserWindow();
/**
* opts: an options object that includes a name, an image and a callback.
* note: the image can only be a file or data uri, see bug 802003
*/
@jeffgca
jeffgca / server.py
Created November 17, 2012 06:35 — forked from anonymous/gist:4093845
super easy python web server
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-p",
"--port",
@jeffgca
jeffgca / server.py
Created July 17, 2012 19:07 — forked from anonymous/gist:3131316
Webapp Servage
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-p",
"--port",