markmap | |||
---|---|---|---|
|
- katex
$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$
$\ce{N2 + 3H2 ->[Fe] 2NH3}$
// ==UserScript== | |
// @name test script | |
// @namespace Violentmonkey Scripts | |
// @icon https://cn.gravatar.com/avatar/a0ad718d86d21262ccd6ff271ece08a3?s=80 | |
// @homepage https://gist.github.com/gera2ld/1c14672b77ade31ad8f0984725de18fc | |
// @resource baidu https://www.baidu.com/img/baidu_jgylogo3.gif | |
// @resource text data:text/plain,hello,world | |
// @resource mochaCss https://cdn.jsdelivr.net/npm/[email protected]/mocha.min.css | |
// @resource cjk https://cdn.jsdelivr.net/gh/intellilab/translator.user.js/README.md | |
// @run-at document-start |
import { Readable } from 'stream'; | |
export function string2stream(stringOrBuffer) { | |
const reader = new Readable(); | |
reader.push(stringOrBuffer); | |
reader.push(null); | |
return reader; | |
} | |
export function stream2buffer(stream) { |
const { Readable } = require('stream'); | |
const tar = require('tar'); | |
export function string2stream(stringOrBuffer) { | |
const reader = new Readable(); | |
reader.push(stringOrBuffer); | |
reader.push(null); | |
return reader; | |
} |
function getConverter(showdown) { | |
showdown.setFlavor('github'); | |
showdown.subParser('runExtension', (ext, source, options, globals) => { | |
let text = source; | |
if (ext.filter) { | |
text = ext.filter(text, globals.converter, options, globals); | |
} | |
return text; | |
}); | |
return new showdown.Converter({ |
const fsPromises = require('fs').promises; | |
const puppeteer = require('puppeteer'); | |
async function main() { | |
const browser = await puppeteer.launch({ | |
headless: true, | |
args: ['--proxy-server=socks5://127.0.0.1:2020'], | |
}); | |
const page = await browser.newPage(); | |
await page.goto('https://gera2ld.space', { waitUntil: 'networkidle0' }); |
markmap | |||
---|---|---|---|
|
expected=( | |
# paste packages to keep here | |
aria2 | |
deno | |
fzf | |
yarn | |
) | |
brew_clean() { | |
while |
// See https://github.com/gera2ld/js-lib |
export function parseCsv(input: string, delimiter = ',') { | |
const scanQuoteEnd = (i: number) => { | |
for (; i < input.length; i += 1) { | |
const c = input[i]; | |
if (c === '"') { | |
if (input[i + 1] === '"') i += 1; | |
else break; | |
} | |
} | |
if (!input[i]) throw new Error('Quote is expected'); |