Skip to content

Instantly share code, notes, and snippets.

View potch's full-sized avatar

Potch potch

View GitHub Profile
2015-08-27T21:34:29.276174+00:00 app[web.1]: npm ERR! moz-games@1.0.0 prod: `npm run prod:build && http-server prod -c60`
2015-08-27T21:34:29.276415+00:00 app[web.1]: npm ERR! spawn ENOENT
2015-08-27T21:34:29.276708+00:00 app[web.1]: npm ERR!
2015-08-27T21:34:29.276966+00:00 app[web.1]: npm ERR! Failed at the moz-games@1.0.0 prod script 'npm run prod:build && http-server prod -c60'.
2015-08-27T21:34:29.277242+00:00 app[web.1]: npm ERR! This is most likely a problem with the moz-games package,
2015-08-27T21:34:29.277477+00:00 app[web.1]: npm ERR! not with npm itself.
2015-08-27T21:34:29.277700+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-08-27T21:34:29.277945+00:00 app[web.1]: npm ERR! npm run prod:build && http-server prod -c60
2015-08-27T21:34:29.278648+00:00 app[web.1]: npm ERR! You can get their info via:
2015-08-27T21:34:29.278882+00:00 app[web.1]: npm ERR! npm owner ls moz-games
@potch
potch / app.js
Last active August 29, 2015 13:58
I don't know what to call this.
import { KeyValueStore } from './storage';
import { d } from './dom';
window.addEventListener('load', function () {
var dom = d(
d.h1(settings.get('name').then(greet)),
d.div(
'This app has been run ',
d.b(
@potch
potch / lonnen.js
Created April 8, 2014 23:47
fix corsica defaults
sendMessage('settings.set', {'plugin': 'reset', 'settings': {'defaultUrl': [
"https://assets.mozillalabs.com/Graphics/Wallpapers/Mozilla-is-my-Dinosaur/mozilla-dinosaur_wallpaper_1920x1200.jpg",
"http://i.imgur.com/HuyRINU.png bg=#e2e2e2",
"http://blog.seanmartell.com/wp-content/uploads/2013/09/dinosaur.png bg=#e4e4e4",
"https://farm4.staticflickr.com/3693/12294574244_088c606d68_o_d.png bg=#0076ba",
"https://assets.mozillalabs.com/Brands-Logos/Thunderbird/logo-only/thunderbird_logo-only_RGB-300dpi.jpg bg=#fff",
"https://assets.mozillalabs.com/Brands-Logos/Webmaker/mozilla-webmaker_logo-wordmark_RGB.jpg bg=#fff",
"https://assets.mozillalabs.com/Brands-Logos/Firefox%20Marketplace/logo-wordmark/firefox-marketplace_logo-wordmark_RGB-300dpi.jpg bg=#fff",
"http://airmozilla-ops1.corpdmz.scl3.mozilla.com/calendar/slide.html",
"https://assets.mozillalabs.com/Brands-Logos/Firefox/logo-only/firefox_logo-only_RGB-300dpi.jpg bg=#fff",
@potch
potch / dealwithitdino.txt
Created April 24, 2014 18:05
Deal With It Dino
__
/..)
/ VV
/ /
/ /
,.--=^^^^^^^^^^^^=--/ /
__/ DEAL WITH IT /
<__.-|_|--------------|_|
function delegate(selector, handler) {
return function(e) {
var context = this;
var target = e.target;
var delegateEl = e.currentTarget;
var matches = delegateEl.querySelectorAll(selector);
for (var el = target; el.parentNode && el !== delegateEl; el = el.parentNode) {
for (var i = 0; i < matches.length; i++) {
if (matches[i] === el) {
handler.call(context, e);
document.webComponentsReady = new Promise(function (resolve, reject) {
document.addEventListener('WebComponentsReady', function (){
resolve();
});
});
@potch
potch / projectmeeting.md
Created May 21, 2014 17:04
Evolving the Project Meeting

Hello!

I've been mulling over ways we can improve upon and evolve the venerable Monday Mozilla Project Meeting for about a year now, and recently been in discussions with Chris Beard, Mitchell Baker, and Mardi Douglass about how we can adapt the current format of the meeting to the changing needs of Mozilla. The following is a proposal for some changes we'd like to make.

Audience

The Project Meeting will switch from a 100% public call to available for all Mozillians. The goal is to have as lightweight a barrier to viewing and participating in the meeting as possible. The official definition of the intended audience is "individuals who are active in the project and/or have a good faith interest in the mission".

Timing

@potch
potch / center.css
Created August 6, 2014 05:06
CSS Centering Yay!
.thing-to-center {
position: absolute;
left: 50%; /* or wherever you want the horizontal center */
top: 50%; /* or wherever you want the vertical center */
transform: translate(-50%,-50%); /* The Magic™ */
}
function VRCard() {
var self = this;
var container = document.createElement('div');
self.container = container;
self.scene = new THREE.Scene();
}
// Just a helper for VRCard.scene.
VRCard.prototype.getScene = function () {
// worker.js
importScripts('commonjs.js');
var marked = require('marked');
var html = marked('# Hello World!');
postMessage(html);