Skip to content

Instantly share code, notes, and snippets.

View jeffgca's full-sized avatar

Jeff Griffiths jeffgca

View GitHub Profile
@jeffgca
jeffgca / new_Jetpack_Addon.js
Created June 12, 2011 04:02 — forked from anonymous/new_Jetpack_Addon.js
Jetpack project creation.
var sanitize_name = function(s) {
return s.replace(/[\s\.]*/g, '').toLowerCase();
}
var os = Components.classes['@activestate.com/koOs;1'].
getService(Components.interfaces.koIOs);
var project_root = ko.filepicker.getFolder(os.getcwd(), "Choose a directory to create your new project in.");
// var project_root = '/Users/jeff/code/moz/jetpack/tmp/two';
@jeffgca
jeffgca / panel.js
Created June 24, 2011 17:55 — forked from wbamberg/gist:1045274
some panel code example from Bamberg.
const widgets = require("widget");
const data = require("self").data;
const panel = require("panel");
var panelScript = "on('message', function(message) {" +
" console.log('receiving ' + message);" +
" }); "
var wid = widgets.Widget({
id: "some_menu",
const self = require("self");
var panelLogin = require("panel").Panel({
contentURL: self.data.url("login.html"),
width: 800,
height: 500,
contentScript: "window.addEventListener('click', function(event) {" +
"console.log('clicked');" +
"}, false);",
contentScriptWhen: "ready"
@jeffgca
jeffgca / main.js
Created September 21, 2011 00:10 — forked from anonymous/main.js
Pasted form Komodo IDE
var tabs = require("tabs");
tabs.on("ready", function(tab) {
console.log(tab.title);
tab.attach({
contentScript: 'document.defaultView.postMessage("this is my message...", "*"); '
});
}
);
@jeffgca
jeffgca / LICENSE.txt
Created October 2, 2011 10:16 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jeffgca
jeffgca / gist:1282050
Created October 12, 2011 18:12 — forked from pilt/gist:1281299
Stevey's Google Platforms Rant
I was at Amazon for about six and a half years, and now I've been at
Google for that long. One thing that struck me immediately about the
two companies -- an impression that has been reinforced almost daily --
is that Amazon does everything wrong, and Google does everything right.
Sure, it's a sweeping generalization, but a surprisingly accurate one.
It's pretty crazy. There are probably a hundred or even two hundred
different ways you can compare the two companies, and Google is superior
in all but three of them, if I recall correctly. I actually did a
spreadsheet at one point but Legal wouldn't let me show it to anyone,
even though recruiting loved it.
@jeffgca
jeffgca / maxart_answered.txt
Created November 17, 2011 17:13
Maxart's questions with responses
- Add-on SDK:
Everything but simple to use. Requires command-line interaction to build an add-on for Firefox...
Needs to open Firefox with another Profile... Really?
[Jeff] one design goal of the SDK is that it should integrate easily with existing development
environments, hence the command-line interface. This is a bias of ours. I take it you think we
should ship a GUI tool similar to, say, Google's AppEngine? As well, we have another goal for restart-less testing, hope to ship soon.
- Add-on Builder:
Good idea, but again, requires an add-on to be installed so devs can test their add-ons without
@jeffgca
jeffgca / jpscripts.sh
Created November 23, 2011 22:18 — forked from anonymous/jpscripts.txt
Bash scripts to drive cfx without having to activate the jetpack environment.
#!/bin/bash
# edit these variables to match your own use case.
PY=`which python`
CFX="$HOME/code/jetpack/addon-sdk/bin/cfx"
#CFX="$HOME/code/jetpack/testing/addon-sdk-1.2b1/bin/cfx"
FF="/Applications/Aurora.app"
P="$HOME/Library/Application\ Support/Firefox/Profiles/b271f03z.Firebug"
$PY $CFX --binary=$FF --profiledir="$P" $@
@jeffgca
jeffgca / flask_geventwebsocket_example.py
Created January 2, 2012 06:01 — forked from lrvick/flask_geventwebsocket_example.py
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@jeffgca
jeffgca / engagementplan.md
Created March 27, 2012 16:33 — forked from wbamberg/gist:2046453
Jetpack engagement plan

Jetpack Developer Engagement Plan

About the Jetpack Project

Project Summary

The Jetpack project's aim is to make it easy to develop Firefox add-ons using JavaScript, HTML and CSS. It has two products:

  • the Add-on Builder, which is an online IDE for add-on development
  • the Add-on SDK, which is a downloadable SDK for developing add-ons locally