Skip to content

Instantly share code, notes, and snippets.

View sergi's full-sized avatar
🎯
Focusing

Sergi Mansilla sergi

🎯
Focusing
View GitHub Profile
diff --git a/dom/icc/Icc.cpp b/dom/icc/Icc.cpp
--- a/dom/icc/Icc.cpp
+++ b/dom/icc/Icc.cpp
@@ -317,8 +317,7 @@
already_AddRefed<DOMRequest>
Icc::UpdateContact(const JSContext* aCx, const nsAString& aContactType,
- JS::Handle<JS::Value> aContact, const nsAString& aPin2,
- ErrorResult& aRv)
+ JS::Handle<JS::Value> aContact, ErrorResult& aRv)
# HG changeset patch
# User Sergi Mansilla <[email protected]>
# Date 1413206712 -7200
# Node ID 8738464c211d0821954c017236e20500b76756b8
# Parent f547cf19d10415162339116376904b94241874ca
Bug 1070961 - No retry count is shown when user enters PIN2 to edit FDN contacts.r=echen
diff --git a/dom/icc/interfaces/nsIIccProvider.idl b/dom/icc/interfaces/nsIIccProvider.idl
--- a/dom/icc/interfaces/nsIIccProvider.idl
+++ b/dom/icc/interfaces/nsIIccProvider.idl
@sergi
sergi / launch_tests.sh
Last active August 29, 2015 14:05
Running tests on Firefox OS
NIGHTLY="/Applications/FirefoxNightly.app/Contents/MacOS"
launch_tests() {
cd $GAIADIR
if [ ! -d profile/extensions/httpd ] ; then
DEBUG=1 make
fi
$NIGHTLY/firefox --no-remote -profile $GAIADIR/profile-debug/ http://test-agent.gaiamobile.org:8080/ &
@sergi
sergi / simulate_jsonp.js
Created July 30, 2014 21:55
Simulate JSONP
script.src = "data:text/javascript;base64," + btoa(
"callback(" + JSON.stringify(dummyData) + ")"
);
@sergi
sergi / contact_datastore.md
Last active August 29, 2015 14:03
Ideas on using 'full-text-like' on IdexedDB

Alternatives to duplicating and indexing fields in Contacts Datastore

Grouping and indexing several fields in the Contacts Datastore requires some duplication, extra-processing and potential problems synchronizing data from the original datastore to the Contacts indexed one. The idea is to come up with alternatives, or at the very least minimize the amount of data that has to be duplicated.

In any case, we should minimize the amount of fields that are indexed to the essential ones. That is name-related, phone, etc. Fields that are likely to have many null values such as organization should not be indexed.

Full-text search

The idea here would be to take the fields we want to index and concatenate them in a string like "Sergi Mansilla Telenor +311234567" or similar. The key of that string would be the same as the key of the original contact, so that we know what the origin is.

// Accumulators
// =============================================================================
//
// A tiny library for reactive programming that offers blazing fast generic
// collection manipulation, asyncronous flow control and the ability to
// represent infinitely large collections.
//
// Copyright Gordon Brander, 2013. Released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
//
// Background:
diff --git a/apps/communications/contacts/test/unit/mock_iccmanager.js b/apps/communications/contacts/test/unit/mock_iccmanager.js
deleted file mode 100644
index 1df8692..0000000
--- a/apps/communications/contacts/test/unit/mock_iccmanager.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict';
-
-var MockIccManager = function() {
- this.iccIds = [];
@sergi
sergi / gist:7544434
Last active December 28, 2015 18:39
Shell helper function to launch Firefox OS test server
launch_tests() {
cd $GAIADIR
if [ ! -d profile/extensions/httpd ] ; then
DEBUG=1 make
fi
$NIGHTLY/firefox --no-remote -profile $GAIADIR/profile-debug/ http://test-agent.gaiamobile.org:8080/ &
make test-agent-server
}
// Accumulators
// =============================================================================
//
// A tiny library for reactive programming that offers blazing fast generic
// collection manipulation, asyncronous flow control and the ability to
// represent infinitely large collections.
//
// Copyright Gordon Brander, 2013. Released under the terms of the [MIT license](http://opensource.org/licenses/MIT).
//
// Background:
@sergi
sergi / graphics-interaction.html
Created August 15, 2013 12:34
Test-case for issue #233 on pixi.js
<html>
<head>
<script src="pixi.js"></script>
</head>
<body>
<script>
var stage = new PIXI.Stage(0x66FF99, true);
var renderer = PIXI.autoDetectRenderer(500, 500);
var graphics = new PIXI.Graphics();