Skip to content

Instantly share code, notes, and snippets.

(function(){(function(f){function e(){return window.getUserAgent?window.getUserAgent():window.navigator.userAgent}function g(){return/MobApp_Android|MobApp_iOS|MobApp_WP/}function c(){return 650>document.documentElement.clientWidth}function a(){return!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}function b(){return/IEMobile/.test(window.navigator.userAgent)}function d(a,b,d){a.removeEventListener?a.removeEventListener(b,d,!1):a.detachEvent&&a.detachEvent("on"+
b,d)}function h(a,b,d){a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent&&a.attachEvent("on"+b,d)}function q(a,b){if(a)return-1!==a.className.indexOf(b)}function l(a,b){a&&a.className&&(a.className=a.className.replace(" "+b,""))}function k(a,b){a&&-1==a.className.indexOf(b)&&(a.className=a.className+" "+b)}function m(a,b,d){var c=document.createElement("script");c.type="text/javascript";c.async=!0;c.id="jsonpGeneratedId-"+t;c.src=a;t++;n(c,b,d)}function n(a,b,d){var c=document.getEleme
var WorkboxSW=(function(){'use strict';class ErrorFactory$1{constructor(a){this._errors=a}createError(a,b){if(!(a in this._errors))throw new Error(`Unable to generate error '${a}'.`);let c=this._errors[a].replace(/\s+/g,' '),d=null;b&&(c+=` [${b.message}]`,d=b.stack);const e=new Error;return e.name=a,e.message=c,e.stack=d,e}}
const errors={"not-in-sw":'workbox-sw must be loaded in your service worker file.',"unsupported-route-type":'The first parameter to registerRoute() should be either an Express-style path string, a RegExp, or a function.',"empty-express-string":'The Express style route string must have some characters, an empty string is invalid.',"bad-revisioned-cache-list":`The 'precache()' method expects`+`an array of revisioned urls like so: ['/example/hello.1234.txt', `+`{path: 'hello.txt', revision: '1234'}]`,"navigation-route-url-string":`The registerNavigationRoute() method `+`expects a URL string as its first parameter.`,"bad-cache-id":`The 'cacheId' parameter must be a string with at least `+`on
@gr1ev0us
gr1ev0us / find.sh
Last active April 26, 2024 21:35
Cheatsheet for find linux
# List of cheatsheet for linux find.
# Taken from here http://alvinalexander.com/unix/edu/examples/find.shtml
# basic 'find file' commands
# --------------------------
find / -name foo.txt -type f -print # full command
find / -name foo.txt -type f # -print isn't necessary
find / -name foo.txt # don't have to specify "type==file"
find . -name foo.txt # search under the current dir
find . -name "foo.*" # wildcard
@wellington1993
wellington1993 / child-transport.js
Created February 7, 2020 17:47
resource://devtools/shared/transport/child-transport.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { Cr } = require("chrome");
const flags = require("devtools/shared/flags");
/**
@wellington1993
wellington1993 / top.js
Created February 11, 2020 02:56
moz-extension://936423b4-ebd6-4837-882e-1d71a488c57e/data/inject/top.js
'use strict';
let now = Date.now();
const prefs = {
'period': 10 * 60, // in seconds
'audio': true, // audio = true => do not discard if audio is playing
'pinned': false, // pinned = true => do not discard if tab is pinned
'online': false, // online = true => do not discard if there is no INTERNET connection
'form': true, // form = true => do not discard if form data is changed
@wellington1993
wellington1993 / AsyncTabSwitcher.jsm
Created February 11, 2020 03:08
resource:///modules/AsyncTabSwitcher.jsm
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["AsyncTabSwitcher"];
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / ExtensionCommon.jsm
Created February 11, 2020 03:11
resource://gre/modules/ExtensionCommon.jsm
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/**
* This module contains utilities and base classes for logic which is
* common between the parent and child process, and in particular
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var k;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ca(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function da(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}return globalThis}var ea=da(this);
;(function(){
/* UNBUILD */
var root;
if(typeof window !== "undefined"){ root = window }
if(typeof global !== "undefined"){ root = global }
root = root || {};
var console = root.console || {log: function(){}};
function USE(arg, req){
return req? require(arg) : arg.slice? USE[R(arg)] : function(mod, path){