Skip to content

Instantly share code, notes, and snippets.

@wellington1993
wellington1993 / DateTimePickerPanel.jsm
Created February 15, 2020 00:21
resource://gre/modules/DateTimePickerPanel.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 = ["DateTimePickerPanel"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
@wellington1993
wellington1993 / Front.js
Created January 14, 2020 18:31
view-source:resource://devtools/shared/protocol/Front.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";
var { settleAll } = require("devtools/shared/DevToolsUtils");
var EventEmitter = require("devtools/shared/event-emitter");
var { Pool } = require("devtools/shared/protocol/Pool");
You may use macro html this way:
{{html
your html content
}}
Example
before html
{{html
https://discordapp.com/invite/emberjs
@wellington1993
wellington1993 / toolbox.js
Created January 15, 2020 21:21
resource://devtools/client/framework/toolbox.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 SOURCE_MAP_WORKER =
"resource://devtools/client/shared/source-map/worker.js";
const SOURCE_MAP_WORKER_ASSETS =
"resource://devtools/client/shared/source-map/assets/";
Important Modified Preferences
Name Value accessibility.typeaheadfind.flashBar 0
apz.allow_zooming true
browser.cache.disk.amount_written 1019288
browser.cache.disk.capacity 1048576
browser.cache.disk.filesystem_reported 1
browser.cache.disk.hashstats_reported 1
browser.cache.disk.telemetry_report_ID 52
browser.contentblocking.category custom
browser.download.folderList 2
(function(window,document,undefined){function ContentValidator(){var $public=this;var $private={};$public.isFilledObject=function(entity){if(!entity||entity.constructor!==Object){return false;}for(var key in entity){return true;}return false;};$public.stringIsNotEmpty=function(string){if(typeof string!=="string"){return false;}return $private.trimString(string).length>0;};$private.trimString=function(string){return string.replace(/^(\s+)|(\s+)$/gm,"").replace(/\s+/gm," ");};$public.stringMatches=function(string,regexp){if(!$public.stringIsNotEmpty(string)){return false;}return regexp.test(string);};return $public;}function CookieUtils(){var $public=this;var $private={};$private.typeValidator=new TypeValidator();$public.getItem=function(name){if(!$private.typeValidator.isString(name)){return;}var cookie=document.cookie;var startIndex=cookie.indexOf(name+"=");if(startIndex===-1){return;}var middleIndex=cookie.indexOf("=",startIndex)+1;var endIndex=cookie.indexOf(";",middleIndex);if(endIndex===-1){endIndex=cooki
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 26, 2024 21:26
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@wellington1993
wellington1993 / datetimebox.js
Created February 24, 2020 12:24
chrome://global/content/elements/datetimebox.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";
// This is a UA widget. It runs in per-origin UA widget scope,
// to be loaded by UAWidgetsChild.jsm.
/*