Skip to content

Instantly share code, notes, and snippets.

@jeffgca
jeffgca / widget.js
Created September 20, 2013 21:26
chrome urls FTW!
require('sdk/widget').Widget({
id: 'mine-test',
label: 'Something',
contentURL: 'chrome://global/skin/icons/webapps-16.png',
onClick: function() {
console.log('foo');
}
});
@jeffgca
jeffgca / output.json
Last active August 17, 2023 18:32
Get 10k extensions from the chrome web store.
[
"https://chrome.google.com/webstore/detail/ballloon-for-chrome/kbmligehjhghebleanjcmenomghmcohn",
"https://chrome.google.com/webstore/detail/shine-for-reddit/acoiihnnfofnpbnofdcgcapbjlcopifa",
"https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk",
"https://chrome.google.com/webstore/detail/highly-highlighter/hjpahjhcglfdopbholajmhpamgblhjhg",
"https://chrome.google.com/webstore/detail/screencastify-screen-vide/mmeijimgabbpbgpdklnllpncmdofkcpn",
"https://chrome.google.com/webstore/detail/sms-from-gmail-facebook-m/iffdacemhfpnchinokehhnppllonacfj",
"https://chrome.google.com/webstore/detail/wot-web-of-trust-website/bhmmomiinigofkjcapegjjndpbikblnp",
"https://chrome.google.com/webstore/detail/mega/bigefpfhnfcobdlfbedofhhaibnlghod",
"https://chrome.google.com/webstore/detail/time-is-money/ooppbnomdcjmoepangldchpmjhkeendl",
@jeffgca
jeffgca / openItermHere.scpt
Created January 17, 2014 23:20
Script that opens a new iTerm tab and cd's to the current directory open in Finder. Best used as a .app bundle made with AppleScript Editor that has been dragged into the finder toolbar. I didn't write this, but heaven help me I do understand it.
-- cd to the current finder window folder in iTerm. Or drag a folder onto this script to cd to that folder in iTerm.
-- found this script in the comments of this article: http://www.macosxhints.com/article.php?story=20050924210643297
-- Instructions for use:
-- paste this script into Script Editor and save as an application to ~/Library/Scripts/Applications/Finder/cd to in iTerm
-- run via the AppleScript Menu item (http://www.apple.com/applescript/scriptmenu/)
-- Or better yet, Control-click and drag it to the top of a finder window so it appears in every finder window.
-- Activate it by clicking on it or dragging a folder onto it.
-- Another nice touch is to give the saved script the same icon as iTerm.
@jeffgca
jeffgca / browser-console-hacks.md
Last active October 23, 2021 16:16
Browser Console Hacks draft post

The Browser Console

The Web Console was the first new developer tool added to Firefox 4, and the team has continued improving it in each release since. With Firefox 24 entering beta, we thought it would be a good time to highlight the features available in the Web Console and introduce its new cousin, the Browser Console.

The Browser Console replaces the venerable Error Console. To open it, hit the familiar Ctrl+Shift+J key-binding ( Command+Shift+J on OS X ):

  • Toggle the different message types: Net, CSS, JS, Security and Logging.
  • Select the level of severity of log messages you want to see for each type from the dropdowns.
@jeffgca
jeffgca / b3k-demo.md
Last active July 7, 2021 22:58
Demo flow for Fission demo at browsers 3000!! Talk

Getting started with fission

( Demo for Browsers 3000 ) Slides here

prep:

rm -fr ~/.config/fission rm /Users/jeff/code/web/fission/svelte-fission-demo/fission.yml

function webGLStart() {
cJ = document.getElementById("game-canvas");
!cD(cJ) || (cK = document.getElementById("ctrl-canvas"), cL = cK.getContext("2d"), cP(null, !0), cN.showStartScreen(cL), cE.init($("#shadersFrame").contents().find("#phong-fs"), $("#shadersFrame").contents().find("#phong-vs")), window.onresize = cP, $("#fpsui").text("FPS: 0"), cl("models/bikePlayer2.json", "inlined", "bike", ck), cl("models/lifeWheel.json", "indexed", "life", ck), cb.explode = {
ring: {}
}, Y(cb.explode), bY(), WebGLUtils.requestAnimationFrame(cJ, cA), setInterval(cB, 1e3))
}
function cP(a, b) {
var c = 20;
drawDiv = document.getElementById("canvas-container");
var d = Math.round(drawDiv.offsetWidth / c) * c;

Keybase proof

I hereby claim:

  • I am therealjeffg on github.
  • I am jeffgee (https://keybase.io/jeffgee) on keybase.
  • I have a public key ASDEKmzDajVqMA_bBj4iNtzVNkH_4uY4MIA3zot9-tMVnwo

To claim this, I am signing this object:

@jeffgca
jeffgca / install-addon
Last active February 7, 2020 11:13 — forked from anonymous/-
A node script that abuses child_process to run cfx and post the resulting xpi to Firefox. Requires: *nix, a working installation of the Add-on SDK ( with cfx on your PATH ) and a recent version of Firefox with the 'Extension Auto-installer' extension installed.
#!/usr/bin/env node
var util = require('util'),
fs = require('fs'),
path = require('path'),
http = require('http'),
_ = require('lodash'),
url = require('url');
var DEBUG = false,
@jeffgca
jeffgca / stats.js
Created July 18, 2018 16:49
get Android health stats
function getStats() {
let selectors = [
'.criteria-widget',
'.status-green',
'.status-yellow',
'.status-red'
];
return selectors.map((s) => {
return [s, document.querySelectorAll(s).length];
@jeffgca
jeffgca / snoozetabs_error.txt
Last active February 22, 2017 18:55
snoozetabs_error
1487789395641 addons.manager WARN Exception calling callback: TypeError: h.Services.appShell.hiddenDOMWindow.navigator.sendBeacon is not a function (resource://gre/modules/commonjs/toolkit/loader.js -> resource://testpilot-addon/data/bundle.js:1:11785) JS Stack trace: a/<@bundle.js:1:11785 < safeCall@AddonManager.jsm:196:5 < makeSafe/<@AddonManager.jsm:211:25 < process@Promise-backend.js:922:23 < walkerLoop@Promise-backend.js:806:7 < Promise*scheduleWalkerLoop@Promise-backend.js:739:11 < schedulePromise@Promise-backend.js:770:7 < Promise.prototype.then@Promise-backend.js:455:5 < getAddon@XPIProviderUtils.js:1067:12 < getVisibleAddonForID@XPIProviderUtils.js:1116:5 < getAddonByID@XPIProvider.jsm:4152:5 < callProviderAsync@AddonManager.jsm:298:12 < promiseCallProvider/<@AddonManager.jsm:322:53 < Promise@Promise-backend.js:390:5 < promiseCallProvider@AddonManager.jsm:321:10 < getAddonByID/promises<@AddonManager.jsm:2469:12 < getAddonByID@AddonManager.jsm:2468:20 < getAddonByID@AddonManager.jsm:3590:7 < a@bundle.