This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Full-Width in MDN | |
// @version 0.3 | |
// @grant none | |
// @match https://developer.mozilla.org/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
const el = document.createElement('style') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Full-Width in Webpack | |
// @version 0.1 | |
// @grant none | |
// @match https://webpack.js.org/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
const el = document.createElement('style') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Full-Width CSS-Trick | |
// @version 0.1 | |
// @grant none | |
// @match https://css-tricks.com/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== | |
const el = document.createElement('style') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Full-Width Stackoverflow | |
// @description try to take over the world! | |
// @author You | |
// @version 0.1 | |
// @grant none | |
// @match https://stackoverflow.com/questions/* | |
// @run-at document-end | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Always English in Mozilla Doc | |
// @version 1 | |
// @grant none | |
// @match https://developer.mozilla.org/* | |
// @run-at document-start | |
// ==/UserScript== | |
const matched = location.pathname.match(/[/](.*)[/]docs[/]/) | |
if (matched && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Pixi API Reference Document Title | |
// @version 1 | |
// @grant none | |
// @match http://pixijs.download/release/docs/* | |
// @match https://pixijs.download/release/docs/* | |
// @run-at document-end | |
// ==/UserScript== | |
//"http://pixijs.download/release/docs/PIXI.BaseTexture.html#.from" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export { } | |
declare global { | |
interface Array<T> { | |
/** Return the last element of this array. */ | |
last (): T | undefined | |
/** Delete the first element from this array. If delete success, return true. */ | |
delete (elem: T): boolean | |
/** Delete the first element satisfying the @param fn. If delete success, return true. */ | |
deleteIf (fn: (elem: T) => boolean): boolean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.xprofile | |
# Screen Resolution | |
xrandr -s 1280x720 | |
# Disable Screensavers and Energy Management | |
# Use `xset q` to see if it succeded. See ~/.xsession-errors to check errors when startup. | |
# ... Donno why Ubuntu work but Lubuntu doesn't... | |
xset dpms 0 0 0 && xset s noblank && xset s off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const JsonFileIo = { | |
/** | |
* NOTE: This function works smoothly on Firefox, but crash on Chromium. | |
* I don't know why, but DON'T USE | |
*/ | |
read(): Promise<any> { | |
return new Promise((resolve, reject) => { | |
const inputEl = document.createElement("input") | |
inputEl.type = 'file' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path') | |
var child_process = require('child_process') | |
const rootDir = path.join(__dirname, '../.') | |
child_process.exec( | |
`grep -RIPzo --no-filename --include=\\*.proto "(?s)\\n rpc (Get|Set|Run).*?(get|post|put|delete):\\N+" "${rootDir}"`, | |
{ maxBuffer: 1024 * 500 * 1024 }, | |
function (error, stdout, stderr) { |