Skip to content

Instantly share code, notes, and snippets.

View oyiptong's full-sized avatar

Olivier Yiptong oyiptong

View GitHub Profile
activity-streams:-5-64 0 TAB_OPEN PerfMeter.js:191
activity-streams:-5-64 133 WORKER_ATTACHED PerfMeter.js:191
activity-streams:-5-64 239 TOP_FRECENT_SITES_REQUEST PerfMeter.js:191
activity-streams:-5-64 248 TOP_FRECENT_SITES_RESPONSE 9 PerfMeter.js:191
activity-streams:-5-64 253 RECENT_LINKS_REQUEST PerfMeter.js:191
activity-streams:-5-64 262 RECENT_LINKS_RESPONSE 9 PerfMeter.js:191
activity-streams:-5-64 277 RECENT_BOOKMARKS_REQUEST PerfMeter.js:191
activity-streams:-5-64 287 RECENT_BOOKMARKS_RESPONSE 10 PerfMeter.js:191
activity-streams:-5-64 291 SEARCH_STATE_REQUEST PerfMeter.js:191
activity-streams:-5-64 298 NOTIFY_PERFORMANCE:BASE_MOUNTED PerfMeter.js:191
@oyiptong
oyiptong / install.rdf
Created May 3, 2016 19:55
install RDF for activity streams 1.0.14
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>@activity-streams</em:id>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>false</em:unpack>
<em:version>1.0.14</em:version>
<em:name>activity-streams-experiment</em:name>
<em:description>A rich visual history feed and a reimagined home page make it easier than ever to find exactly what you&apos;re looking for in Firefox.</em:description>
#!/usr/bin/env python
from __future__ import print_function
from time import time
import sys
import sqlite3
import json
from uuid import uuid4
conn = sqlite3.connect('max.backup.sqlite', detect_types=sqlite3.PARSE_COLNAMES)
cur = conn.cursor()
#!/usr/bin/env python
from __future__ import print_function
import sys
import sqlite3
from uuid import uuid4
conn = sqlite3.connect('places.backup.sqlite', detect_types=sqlite3.PARSE_COLNAMES)
conn.row_factory = sqlite3.Row
cur = conn.cursor()
drop_tables = [
/* globals XPCOMUtils, aboutNewTabService, Services, registerCleanupFunction */
"use strict";
let Cu = Components.utils;
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
/* globals XPCOMUtils, aboutNewTabService, Services, registerCleanupFunction */
"use strict";
let Cu = Components.utils;
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
@oyiptong
oyiptong / index.js
Created January 19, 2016 20:27
newtaboverride 2.3 index.js using aboutNewTabService
const ONE_SECOND_IN_MILLISECONDS = 1000;
const URL_CHARS_LIMIT = 2000;
const { PrefsTarget } = require('sdk/preferences/event-target');
const { setInterval, clearInterval } = require('sdk/timers');
const {Cu} = require('chrome');
const clipboard = require('sdk/clipboard');
const preferencesService = require('sdk/preferences/service');
const prefsTarget = PrefsTarget({ branchName: 'browser.startup.'});
const simplePrefs = require('sdk/simple-prefs');
{
"maxerr": 50,
"bitwise": false,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": false,
"indent": 2,
@oyiptong
oyiptong / .jscsrc
Last active January 25, 2016 15:42
{
"preset": "google",
"fileExtensions": [".js", ".jsm"],
"maximumLineLength": 120,
"esnext": true,
"validateQuoteMarks": true,
"requireCamelCaseOrUpperCaseIdentifiers": null
}
from splice.environment import Environment
env = Environment.instance()
with env.application.app_context():
# do things that use the database here
pass