Skip to content

Instantly share code, notes, and snippets.

View zbraniecki's full-sized avatar

Zibi Braniecki zbraniecki

View GitHub Profile
diff --git a/apps/homescreen/js/page.js b/apps/homescreen/js/page.js
index f9a7635..e1d64fd 100644
--- a/apps/homescreen/js/page.js
+++ b/apps/homescreen/js/page.js
@@ -624,6 +624,8 @@ Page.prototype = {
* @param{Object} DOM element
*/
tap: function pg_tap(elem) {
+ console.log('User tapped an icon');
+ console.log(new Date().getTime());
@zbraniecki
zbraniecki / fuzz
Last active August 29, 2015 14:23
#!/usr/bin/env python
import argparse
import random
import hglib
import json
import subprocess
import re
PY_COMPARE = 'compare-dirs'
(function () {
'use strict';
const modules = new Map();
const moduleCache = new Map();
function getModule(id) {
if (!moduleCache.has(id)) {
moduleCache.set(id, modules.get(id)())
}
let promises = [];
let l10nResLinks = document.head.querySelectorAll('link[rel=localization]');
for (link of l10nResLinks) {
promises.push(link.ready);
};
Promise.all(promises).then(function (resources) {
return Promise.all(resources.map(function(response) {
#!/usr/bin/env python
from distutils.core import setup
import os
setup(name='l20n',
version='1.0',
description='Python L20n library',
author='Mozilla',
author_email='[email protected]',
(function() {
const observerConfig = {
attributes: false,
characterData: false,
childList: true,
subtree: false,
};
var observer = new MutationObserver(onMutations);
'use strict';
var Path = require('path');
var fs = require('fs');
var moduleIds;
var modules;
/*
const modules = new Map();
dbg = null;
Components.utils.forceGC();
Components.utils.import("resource://gre/modules/devtools/Loader.jsm");
Debugger = devtools.require("Debugger");
dbg = devtools.require("devtools/server/actors/utils/make-debugger")({
findDebuggees: dbg => dbg.findAllGlobals(),
shouldAddNewGlobalAsDebuggee: () => true
});
#!/bin/bash
echo "========= Apps ==============="
dir=/Users/zbraniecki/projects/gaia/apps
DIRS=`ls -l $dir | egrep '^d' | awk '{print $9}'`
st1tot=0
st2tot=0
st3tot=0
stsumtot=0
@zbraniecki
zbraniecki / cachedIterable.js
Last active March 16, 2017 19:14
[JS] Iterable that can be replayed and caches resolved results
function cachedIterable(iterable) {
const cache = [];
return {
[Symbol.iterator]() {
return {
ptr: 0,
next() {
if (cache.length <= this.ptr) {
cache.push(iterable.next());
}