Skip to content

Instantly share code, notes, and snippets.

View sergi's full-sized avatar
🎯
Focusing

Sergi Mansilla sergi

🎯
Focusing
View GitHub Profile
@sergi
sergi / chicken-keywords
Created March 20, 2015 10:51
List of Scheme and Chicken Scheme words for autocompletion
abs
acos
and
angle
append
apply
asin
assoc
assq
assv
@sergi
sergi / gist:541d70bdaf20ca20f5a2
Created February 5, 2015 21:05
Cached boot of Contacts app on a GP Peak, DOM manipulation
I/Communications( 4280): Content JS LOG: Bootstrap 825.614999
I/Communications( 4280): Content JS LOG: DOMContentLoaded 984.1916659999999
I/Communications( 4280): Content JS LOG: CACHE content! 988.03
I/Communications( 4280): Content JS LOG: Appending nodes to container 990.3100000000001
I/Communications( 4280): Content JS LOG: Node appended 1011.744999
I/Communications( 4280): Content JS LOG: All nodes appended 1014.713333
I/Communications( 4280): Content JS LOG: onload 1164.018333
I/Communications( 4280): Content JS LOG: Load scripts done 1325.608332
I/Communications( 4280): Content JS LOG: initContacts 1848.798333
I/Communications( 4280): Content JS LOG: localized 1880.9833330000001
@sergi
sergi / output1.txt
Created February 5, 2015 20:55
Cold boot of Contacts app on a GP Peak, DOM manippulation
I/Communications( 4244): Content JS LOG: Bootstrap 828.6133329999999
I/Communications( 4244): Content JS LOG: DOMContentLoaded 978.1716660000001
I/Communications( 4244): Content JS LOG: CACHE content! 982.318333
I/Communications( 4244): Content JS LOG: onload 1038.433333
I/Communications( 4244): Content JS LOG: Load scripts done 1203.2916659999999
I/Communications( 4244): Content JS LOG: initContacts 1571.6200000000001
I/Communications( 4244): Content JS LOG: localized 1598.808333
I/Communications( 4244): Content JS LOG: init 1600.329999
I/Communications( 4244): Content JS LOG: initContainers 1601.558333
I/Communications( 4244): Content JS LOG: initEventListeners 1603.163333
test_rx_jsonp({
"result": "IT works!"
})
@sergi
sergi / less-patch.diff
Created January 9, 2015 12:46
Add less processing
From a605d8e9440240fa6a26ece012c058bd302c981a Mon Sep 17 00:00:00 2001
From: Sergi Mansilla <[email protected]>
Date: Fri, 9 Jan 2015 13:43:15 +0100
Subject: [PATCH] Added automatic processing of *.less files using 'gulp-less'
and grouped browserify script processing and less file processing in the
'default' gulp task.
---
gulpfile.js | 27 ++++++++++++---------------
package.json | 1 +
navigator.getDataStores('sergi2').then(function(stores) {
console.log(stores.length)
var store = stores[0];
return store.add({ "blah": false }).then(function(id) {
document.body.innerHTML = 'Inserted value in sergi2: ' + id;
});
}, function(e) {
document.body.innerHTML = 'Error inserting value in sergi2: ' + e;
console.log(e);
});
var DBNAME = 'tabgrenade';
var DBVERSION = 1;
var STORENAME = 'keyvaluepairs';
var db = null;
function withStore(type, f) {
if (db) {
f(db.transaction(STORENAME, type).objectStore(STORENAME));
} else {
var openreq = indexedDB.open(DBNAME, DBVERSION);
@sergi
sergi / arrow_scope.js
Created October 28, 2014 09:10
Arrow functions scope
var o = {
traditionalFunc: function () {
// Normal function, bound as expected
console.log('traditionalFunc this === o?', this === o);
},
arrowFunc: () => {
// Arrow function, bound to scope where it's created
console.log('arrowFunc this === o?', this === o);
console.log('arrowFunc this === window?', this === window);
}
@sergi
sergi / RIL_MATRIX2.txt
Created October 21, 2014 16:09
RIL_MATRIX2
I/Gecko ( 120): -*- RadioInterfaceLayer: Received 'RIL:GetCardLockRetryCount' message from content process
I/Gecko ( 120): RIL Worker: [0] Received chrome message {"lockType":"pin2","requestId":"id{297a3181-47de-4eeb-8059-13649ed0fd34}","rilMessageClientId":0,"rilMessageToken":32,"rilMessageType":"iccGetCardLockRetryCount"}
I/Gecko ( 120): -*- RadioInterface[0]: Received message from worker: {"lockType":"pin2","requestId":"id{297a3181-47de-4eeb-8059-13649ed0fd34}","rilMessageClientId":0,"rilMessageToken":32,"rilMessageType":"iccGetCardLockRetryCount","errorMsg":"RequestNotSupported","success":false}
I/Gecko ( 463): -*- RILContentHelper: Received message 'RIL:CardLockRetryCount': {"clientId":0,"data":{"lockType":"pin2","requestId":"id{297a3181-47de-4eeb-8059-13649ed0fd34}","rilMessageClientId":0,"rilMessageToken":32,"rilMessageType":"iccGetCardLockRetryCount","errorMsg":"RequestNotSupported","success":false}}
I/Gecko ( 463): -*- RILContentHelper: fire request error, id: id{297a3181-47de-4eeb-805
@sergi
sergi / RIL_MATRIX.txt
Created October 21, 2014 16:05
RIL_MATRIX
I/Gecko ( 120): -*- RadioInterfaceLayer: Received 'RIL:GetCardLockRetryCount' message from content process
I/Gecko ( 120): RIL Worker: [0] Received chrome message {"lockType":"pin2","requestId":"id{dbc7a938-4b9c-401c-85e6-dc1bcce85b15}","rilMessageClientId":0,"rilMessageToken":29,"rilMessageType":"iccGetCardLockRetryCount"}
I/Gecko ( 120): -*- RadioInterface[0]: Received message from worker: {"lockType":"pin2","requestId":"id{dbc7a938-4b9c-401c-85e6-dc1bcce85b15}","rilMessageClientId":0,"rilMessageToken":29,"rilMessageType":"iccGetCardLockRetryCount","errorMsg":"RequestNotSupported","success":false}
I/Gecko ( 463): -*- RILContentHelper: Received message 'RIL:CardLockRetryCount': {"clientId":0,"data":{"lockType":"pin2","requestId":"id{dbc7a938-4b9c-401c-85e6-dc1bcce85b15}","rilMessageClientId":0,"rilMessageToken":29,"rilMessageType":"iccGetCardLockRetryCount","errorMsg":"RequestNotSupported","success":false}}
I/Gecko ( 463): -*- RILContentHelper: fire request error, id: id{dbc7a938-4b9c-401c-85e