Skip to content

Instantly share code, notes, and snippets.

Avatar

Harald Kirschner digitarald

View GitHub Profile
@digitarald
digitarald / index.html
Last active Aug 24, 2017
Console log line-height issue
View index.html
<script>
console.log('%cline-height: 1.5', 'line-height: 1.5; background-color: red; color: white')
console.log('%cline-height: 1.5em', 'line-height: 1.5em; background-color: red; color: white')
console.log('%cline-height: 50px', 'line-height: 50px; background-color: red; color: white')
</script>
See DevTools Console
@digitarald
digitarald / test.log
Created May 24, 2017
Foxfooding Analysis
View test.log
Long Frames: Main
16-20: 2156
20-40: 1015
40-60: 203
60-80: 116
80-100: 95
100-120: 61
120-140: 44
140-160: 24
160-180: 33
@digitarald
digitarald / webpack.js
Created Jun 7, 2016 — forked from Couto/webpack.js
Fetch polyfill with webpack
View webpack.js
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
View npm-debug.log
This file has been truncated, but you can view the full file.
28014 http request GET https://registry.npmjs.org/semver
28015 verbose request uri https://registry.npmjs.org/hosted-git-info
28016 verbose request no auth needed
28017 info attempt registry request try #1 at 1:30:45 PM
28018 verbose request using bearer token for auth
28019 verbose etag "CTVPC6MTOOUB33OPF9OBO9WB7"
28020 http request GET https://registry.npmjs.org/hosted-git-info
28021 verbose request uri https://registry.npmjs.org/validate-npm-package-license
28022 verbose request no auth needed
View patch.diff
diff --git a/cache-then-network/sw.js b/cache-then-network/sw.js
index 9449f5f..8170159 100644
--- a/cache-then-network/sw.js
+++ b/cache-then-network/sw.js
@@ -6,15 +6,12 @@ var cacheName = 'cache-then-network';
self.addEventListener('install', function(ev) {
console.log('SW install event');
- self.skipWaiting();
- ev.waitUntil(self.clients.claim());
View gist:6ba11e21306f02ac7874
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/
@digitarald
digitarald / apps-partner-engineer.md
Last active Aug 29, 2015
Mozilla Jobs: Apps Partner Engineering
View apps-partner-engineer.md

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

@digitarald
digitarald / .bash_profile
Created Jan 20, 2015
Zip current folder into Firefox OS app package for submission, excluding hidden files and other misc files not needed
View .bash_profile
alias app-zip='zip -Xr ./package.zip ./* -x Makefile package.zip LICENSE install.html package.manifest *.sh META-INF "*\/.*" && open ./'
@digitarald
digitarald / gist:9841c88f9398f4aa4dc9
Created Nov 21, 2014
Redirect from your Firefox OS packaged app to desktop website
View gist:9841c88f9398f4aa4dc9
if (!(/mobile|tablet/i).test(navigator.userAgent)) {
location.href = 'http://www.your-desktop-version.com/';
}
@digitarald
digitarald / load-me-before-all.js
Created Nov 17, 2014
SystemXHR Everywhere Monkeypatch
View load-me-before-all.js
// Monkeypatch XHR to always use systemXHR
var oldXMLHttpRequest = XMLHttpRequest;
XMLHttpRequest = function() {
return new oldXMLHttpRequest({
mozSystem: true
});
};
You can’t perform that action at this time.