Skip to content

Instantly share code, notes, and snippets.

View digitarald's full-sized avatar
🏳️‍🌈

Harald Kirschner digitarald

🏳️‍🌈
View GitHub Profile
[
{
"app_name": "connecta2",
"is_packaged": true,
"app_manifest": "https://marketplace.firefox.com/app/956189a1-c985-4824-85a9-de708d38d6f9/manifest.webapp"
},
{
"app_name": "whatsapp-firefox-os",
"is_packaged": true,
"app_manifest": "https://marketplace.firefox.com/app/90aa85eb-60f0-4e58-8147-558e162fac1c/manifest.webapp"
@digitarald
digitarald / index.html
Last active August 29, 2015 14:00
Benchmark for setting transform styles from a 3d matrix
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Famous test</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<style>
html, body {
margin: 0;
padding: 0;
@digitarald
digitarald / index.html
Last active August 29, 2015 14:00
famo.us benchmark, 99 surfaces rotated by easing
<!DOCTYPE HTML>
<html>
<head>
<title>Famous test</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
</head>
<body>
@digitarald
digitarald / detectInstallOrigin.js
Created October 17, 2014 18:06
Detect installOrigin in Firefox apps to defer preload status.
/**
* Detect installOrigin in Firefox apps to defer preload status.
*
* For most apps the installOrigin will be https://marketplace.firefox.com
* Preloaded apps *can* customize their installOrigin to reflect country and/or
* carrier (like https://fxos.telefonia.es for Telefónica in Spain).
*
* @param {Function} done Node-style callback (err, origin)
* @example
@digitarald
digitarald / load-me-before-all.js
Created November 17, 2014 21:30
SystemXHR Everywhere Monkeypatch
// Monkeypatch XHR to always use systemXHR
var oldXMLHttpRequest = XMLHttpRequest;
XMLHttpRequest = function() {
return new oldXMLHttpRequest({
mozSystem: true
});
};
@digitarald
digitarald / gist:9841c88f9398f4aa4dc9
Created November 21, 2014 04:40
Redirect from your Firefox OS packaged app to desktop website
if (!(/mobile|tablet/i).test(navigator.userAgent)) {
location.href = 'http://www.your-desktop-version.com/';
}
@digitarald
digitarald / .bash_profile
Created January 20, 2015 22:12
Zip current folder into Firefox OS app package for submission, excluding hidden files and other misc files not needed
alias app-zip='zip -Xr ./package.zip ./* -x Makefile package.zip LICENSE install.html package.manifest *.sh META-INF "*\/.*" && open ./'
@digitarald
digitarald / apps-partner-engineer.md
Last active August 29, 2015 14:21
Mozilla Jobs: Apps Partner Engineering

How to Apply? Drop me, Harald @digitarald, a line.

Don't want to Apply? Spread the Word –or– Refer a Friend!

Apps Partner Engineer

Mozilla’s Apps Partner Engineering team works with strategic partners, including some of the world's most influential companies, to make their web apps successful on the Open Web, Firefox Marketplace and Firefox OS. As the ideal candidate, you have a track record of excellent technical and business skills. Your focus will be on supporting the Global Mobile Partnerships & Business Development team in their strategic deals, helping new App partners through onboarding and adoption, providing ongoing support to existing partners, and representing those partners and their feedback among our engineering and product teams.

Responsibilities

Play the game on Codepen: http://codepen.io/mozhacks/pen/xGgevw?editors=001
or fork it on Github: https://github.com/mozilla/devtools-perf-game
Learn more at Mozilla Hacks: https://hacks.mozilla.org/2015/06/power-surge-optimize-the-javascript-in-this-html5-game-using-firefox-developer-edition/
module Murray
class Router
class << self
attr_reader :mapping
def map &block
@mapping = []
instance_eval &block
self
end