Skip to content

Instantly share code, notes, and snippets.

@subfuzion
subfuzion / redis-autostart-osx.md
Last active April 26, 2024 21:40
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

@wellington1993
wellington1993 / PrivateBrowsingUtils.jsm
Created January 11, 2020 00:23
resource://gre/modules/PrivateBrowsingUtils.jsm
/* 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/. */
var EXPORTED_SYMBOLS = ["PrivateBrowsingUtils"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const kAutoStartPref = "browser.privatebrowsing.autostart";
@wellington1993
wellington1993 / PHP-exemplo-busca-CSRF-Token-Rails-usando-meta-tags.php
Last active April 26, 2024 21:40
PHP, exemplo busca de CSRF Token do Rails, usando meta tags
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
# phpinfo();
$url = 'https://lablaudo.com.br/home';
$tags = get_meta_tags($url);
# print_r($tags);
@wellington1993
wellington1993 / UrlbarUtils.jsm
Created January 29, 2020 02:48
view-source:resource:///modules/UrlbarUtils.jsm
/* 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 exports the UrlbarUtils singleton, which contains constants and
* helper functions that are useful to all components of the urlbar.
*/
@wellington1993
wellington1993 / network-response-listener.js
Created January 14, 2020 18:32
view-source:resource://devtools/server/actors/network-monitor/network-response-listener.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 { Cc, Ci, Cr } = require("chrome");
const ChromeUtils = require("ChromeUtils");
const Services = require("Services");
@wellington1993
wellington1993 / customizableWidgets.properties
Created February 3, 2020 13:36
chrome://browser/locale/customizableui/customizableWidgets.properties
history-panelmenu.label = History
history-panelmenu.tooltiptext2 = Show your history (%S)
remotetabs-panelmenu.label = Synced Tabs
remotetabs-panelmenu.tooltiptext2 = Show tabs from other devices
privatebrowsing-button.label = New Private Window
privatebrowsing-button.tooltiptext = Open a new Private Browsing window (%S)
@wellington1993
wellington1993 / CustomizableUI.jsm
Created February 3, 2020 13:36
resource:///modules/CustomizableUI.jsm
/* 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 = ["CustomizableUI"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
@wellington1993
wellington1993 / ShortcutUtils.jsm
Created February 3, 2020 13:37
resource://gre/modules/ShortcutUtils.jsm
/* 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 = ["ShortcutUtils"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / backgroundPageThumbsContent.js
Last active April 26, 2024 21:39
chrome://global/content/backgroundPageThumbsContent.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/. */
/* eslint-env mozilla/frame-script */
const { PageThumbUtils } = ChromeUtils.import(
"resource://gre/modules/PageThumbUtils.jsm"
);
const { XPCOMUtils } = ChromeUtils.import(
@wellington1993
wellington1993 / fix-cnpj-rj.js
Last active April 26, 2024 21:38
Fix CNPJ Paste RJ
document.formulario.critica_dado[0].checked = true;
ocultaTabelaCampos();
document.formulario.radio_cpfcnpj[1].checked = true;
ocultaTabelaCampos();
document.getElementById("destcnpj").style= "";
document.getElementById("destcnpj").onpaste = "";
document.getElementById("destcnpj").onblur = "";
document.getElementById("destcnpj").onkeypress = "";