View _ff-addon-snippet-copyOfRequestSource.js
/////// START - DO NOT EDIT
var {classes: Cc, interfaces: Ci, results: Cr, Constructor: CC, utils: Cu} = Components;
Cu.import('resource://gre/modules/Services.jsm');
var BinaryInputStream = CC('@mozilla.org/binaryinputstream;1', 'nsIBinaryInputStream', 'setInputStream');
var BinaryOutputStream = CC('@mozilla.org/binaryoutputstream;1', 'nsIBinaryOutputStream', 'setOutputStream');
var StorageStream = CC('@mozilla.org/storagestream;1', 'nsIStorageStream', 'init');
function TracingListener() {
this.receivedChunks = []; // array for incoming data. holds chunks as they come, onStopRequest we join these junks to get the full source
View _flowtyped
files i use in my flow-typed dir
View _ff-addon-snippet-xcbGrabKey.js
Cu.import('resource://gre/modules/ctypes.jsm');
var libxcb;
try {
libxcb = ctypes.open('libxcb.so');
} catch(ignore) {
libxcb = ctypes.open('libxcb.so.1');
}
var libkey;
View regex_patt_release.md

Find: ^.*?console\.(warn|info|log|error|exception).*?$ Replace with: ``

View bootstrap.js
const {interfaces: Ci, utils: Cu} = Components;
Cu.import('resource://gre/modules/Services.jsm');
/*start - windowlistener*/
var windowListener = {
//DO NOT EDIT HERE
onOpenWindow: function (aXULWindow) {
// Wait for the window to finish loading
let aDOMWindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
aDOMWindow.addEventListener("load", function () {
View _ff-addon-snippet-ObjC-NSNotificationApplicationWillLaunch.js
Cu.import('resource://gre/modules/ctypes.jsm');
var objc = ctypes.open(ctypes.libraryName('objc'));
// BASIC TYPES
var BOOL = ctypes.signed_char;
var CHAR = ctypes.char;
var CLASS = ctypes.voidptr_t;
var ID = ctypes.voidptr_t;
var NSNOTIFICATIONPTR = ctypes.voidptr_t;
View android-record.md
adb shell screenrecord /sdcard/test.mp4
View _ff-addon-snippet-IsWorktationLocked.js
Cu.import('resource://gre/modules/ctypes.jsm')
var wintypesInit = function() {
// BASIC TYPES (ones that arent equal to something predefined by me)
this.BOOL = ctypes.bool;
this.DWORD = ctypes.uint32_t;
this.HANDLE = ctypes.voidptr_t;
this.INT = ctypes.int;
this.PVOID = ctypes.voidptr_t;
View _react_hoc-add-props-if.js
// @flow
import React, { Component } from 'react'
import wrapDisplayName from 'recompose/wrapDisplayName'
function getDepth(element) {
let depth = 0;
let elementCur = element;
while (elementCur.parentElement) {
elementCur = elementCur.parentElement;
View _react-iterateIiHocChildren.js
render() {
const view = super.render()
// if (elementsTree && elementsTree.type === 'input') {
// newProps = {value: 'may the force be with you'}
// }
// depth first - stack - last in first out
// iterate depth first until a Field is found
const fields = [];
const elements = [view]; // stack