Skip to content

Instantly share code, notes, and snippets.

View lightsofapollo's full-sized avatar

James Lal lightsofapollo

View GitHub Profile
// With __proto__
function MyClass() {
}
MyClass.prototype = {
__proto__: Parent.prototype,
myFunc: function() {
}
@lightsofapollo
lightsofapollo / gist:2722816
Created May 18, 2012 02:34
amazing CI test result formatting.
testsuite name="Mocha Tests" tests="67" failures="0" errors="0" skip="0" timestamp="Fri, 18 May 2012 02:33:37 GMT" time="24.886">
<testcase classname="[gallery] GestureDetector API" name="[gallery] public methods and constants" time="0.007"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] tap" time="0.081"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] mousetap" time="0.048"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] dbltap" time="0.073"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] mousedbltap" time="0.119"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe E" time="0.224"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe W" time="0.222"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe S" time="0.21"/>
<testcase classname="[gallery] GestureDe
@lightsofapollo
lightsofapollo / gist:2722819
Created May 18, 2012 02:34
amazing CI test result formatting.
<testsuite name="Mocha Tests" tests="67" failures="0" errors="0" skip="0" timestamp="Fri, 18 May 2012 02:33:37 GMT" time="24.886">
<testcase classname="[gallery] GestureDetector API" name="[gallery] public methods and constants" time="0.007"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] tap" time="0.081"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] mousetap" time="0.048"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] dbltap" time="0.073"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] mousedbltap" time="0.119"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe E" time="0.224"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe W" time="0.222"/>
<testcase classname="[gallery] GestureDetector gesture detection" name="[gallery] swipe S" time="0.21"/>
<testcase classname="[gallery] GestureD
jlal➜~/workspace/gaia(test-agent-upgrades-app-utils✗)» make profile
(if [ -d ./.git ]; then \
git log -1 --format="%H%n%at" HEAD > apps/settings/gaia-commit.txt; \
else \
echo 'Unknown Git commit; build date shown here.' > apps/settings/gaia-commit.txt; \
date +%s >> apps/settings/gaia-commit.txt; \
fi)
browser
calculator
camera
@lightsofapollo
lightsofapollo / import.js
Created May 30, 2012 16:11
marionette import script
client.startSession();
client.importScript(myURl, myVar);
client.touch = function() {
client.executeScript('myVar...');
}
client.goUrl('google.com');
yield client.executeAsyncScript(function() {
var complete = this.marionetteDone;
setTimeout(function() {
complete('woo');
}, 500)
});
//command returns woo
# assume we are cd'd into mozilla central
export GECKO_PATH=`pwd`
if [ ! -d "B2G" ]; then
git clone git://github.com/mozilla-b2g/B2G.git
fi
cd B2G
rm -rf out
rm -rf objdir-gecko
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
68:{
"from": "root",
"applicationType": "browser",
"traits": []
}
/*
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/calendar/dav/calmozilla1%40gmail.com/user/</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<D:principal-URL>
<D:href>/calendar/dav/calmozilla1@gmail.com/user/</D:href>
</D:principal-URL>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/dav/calmozilla1/Calendar/calmozilla1/6e4d147f-4d75-436f-a233-976fd06fd3f7.ics</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop>
<C:calendar-data xmlns:C="urn:ietf:params:xml:ns:caldav">BEGIN:VCALENDAR
VERSION:2.0 PRODID:Zimbra-Calendar-Provider
BEGIN:VTIMEZONE TZID:Etc/GMT
BEGIN:STANDARD DTSTART:19710101T000000