Skip to content

Instantly share code, notes, and snippets.

View daleharvey's full-sized avatar

Dale Harvey daleharvey

View GitHub Profile
<script>
var request = indexedDB.open('mydb');
request.onsuccess = function(event) {
var db = request.result;
var objectStore = db.transaction("ostore").objectStore("ostore");
objectStore.openCursor().onsuccess = function(event) {
console.log(event.target.result);
};
};
</script>
$ brew uninstall -v grep
Uninstalling /usr/local/Cellar/grep/2.15...
rm /usr/local/bin/ggrep
rm /usr/local/bin/gfgrep
rm /usr/local/bin/gegrep
rm /usr/local/share/man/man1/ggrep.1
rm /usr/local/share/man/man1/gfgrep.1
rm /usr/local/share/man/man1/gegrep.1
/Volumes/firefoxos/gaia (master)$ brew install -v --default-names grep
==> Downloading http://ftpmirror.gnu.org/grep/grep-2.15.tar.xz
function incrementalView() {
db.changes({
since: x,
onChange: function(doc) {
// we cant do this, but lets just pretend the map returned
// an array of emitted [{key: akey, val: anobj}];
var viewData = designDoc.map(doc);
/Volumes/firefoxos/B2G-32 (master)$ ./flash.sh gecko
remount failed: Operation not permitted
push: /Volumes/firefoxos/B2G-32/objdir-mc-debug/dist/b2g/dictionaries/en-US.dic -> /system/b2g/dictionaries/en-US.dic
failed to copy '/Volumes/firefoxos/B2G-32/objdir-mc-debug/dist/b2g/dictionaries/en-US.dic' to '/system/b2g/dictionaries/en-US.dic': Read-only file system
$ ./build.sh -j1
including device/generic/armv7-a-neon/vendorsetup.sh
including sdk/bash_completion/adb.bash
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.3
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
unit-test-firefox:
./tests/travis_ci/unit-tests-in-firefox/install
./tests/travis_ci/unit-tests-in-firefox/before_script
./tests/travis_ci/unit-tests-in-firefox/script
check-gjslint-installed:
@if ! command -v gjslint >/dev/null 2>&1; then \
sudo easy_install $(CLOSURE_URL); \
fi
var replicate = db.replicate.from(remote, {
filter: function(doc, req) {
return doc.integer % req.query.divisor === 0;
}
query_params: {divisor: 2}
/Volumes/firefoxos/mozilla-central-git (master)$ python ./testing/mochitest/runtests.py
Traceback (most recent call last):
File "./testing/mochitest/runtests.py", line 17, in <module>
import mozcrash
ImportError: No module named mozcrash
it('changes are not duplicated', function (done) {
var db = new PouchDB(dbs.name);
var called = 0;
var changes = db.changes({
since: 'latest',
continuous: true,
onChange: function () {
called++;
}
});