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 Startpage Options | |
// @grant GM_style.add | |
// @match *://startpage.com/* | |
// @match *://www.startpage.com/* | |
// @run-at document-begin | |
// ==/UserScript== | |
// Updated for May 2021 startpage element selector changes |
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 Webkit's filter may globally dim | |
// @description web pages in a pleasing manner | |
// @grant GM_addStyle | |
// @run-at document-end | |
// @exclude *://*.github.com/* | |
// @exclude *://github.com/* | |
// ==/UserScript== | |
function addStyle(css) { |
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
// ############################### | |
// runPackager.js | |
// ############################### | |
// In this example, the IO function is tightly coupled with the implementation | |
import { execFileSync } from 'child_process'; | |
type RunPackagerOptions = { | |
projectRoot: string, // CWD the react-native binary is being run from | |
targetDir: string, // Target directory absolute or relative to projectRoot (e.g. 'rna/') |
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
# Bindings | |
config.bind("gi", "hint inputs") | |
config.bind("<f12>", "inspector") | |
#config.unbind("+") | |
#config.unbind("-") | |
#config.unbind("=") | |
#config.bind("z+", "zoom-in") | |
#config.bind("z-", "zoom-out") |
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
const microtime = (() => { | |
const currentNano = () => { | |
const [a, b] = process.hrtime() | |
return a * 1000000000 + b | |
} | |
const nanoToMilli = (ns) => (ns / 1000000).toFixed(3) | |
const markers = { | |
'-1': currentNano() | |
} | |
return { |
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
const logMessage = (message) => console.log(Date.now(), message) | |
const responses = [ | |
{ | |
input: "test-one", | |
answer: "One" | |
}, | |
{ | |
input: "test-two", | |
helper: (input, callback) => callback("Two helper") |
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
// Recursion: a function may call itself and work with the return value. | |
// It can do this multiple times before returning the original execution | |
const getDeepTotal = function deepTotal(inputArray) { | |
let total = 0 | |
inputArray.forEach((el)=>{ | |
total += Array.isArray(el) ? deepTotal(el) : el | |
}) | |
return total | |
} |
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
const logMessage = (message) => console.log(Date.now(), message) | |
const responses = [ | |
{ | |
input: "test-one", | |
answer: "One", | |
}, | |
{ | |
input: "test-two", | |
helper: (input, callback) => { |