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
function jsonRowListFromCsv({ | |
csv | |
}) { | |
/* | |
* this function will convert <csv>-text to json list-of-list | |
*/ | |
/* | |
https://tools.ietf.org/html/rfc4180#section-2 | |
Definition of the CSV Format | |
While there are various specifications and implementations for the |
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
function replStart () { | |
/* | |
* this function will start repl-debugger | |
*/ | |
let that; | |
if (globalThis.utility2_repl1) { | |
return; | |
} | |
// start repl | |
that = require("repl").start({ |
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
/* | |
* chrome-devtools-client-example.js | |
* | |
* this zero-dependency nodejs-script demonstrates how to programmatically | |
* script chrome-browser to do tasks using chrome-devtools-protocol commands | |
* over websocket | |
* | |
* tldr - jump down to section "quickstart-example" to see an example task | |
* | |
* Chrome DevTools Protocol Documentation: |
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
// https://tools.ietf.org/html/rfc7516#appendix-A.3 | |
(async function () { | |
"use strict"; | |
let aad; | |
let aal; | |
let assertJsonEqual; | |
let base64urlFromBuffer; | |
let base64urlToBuffer; | |
let cek; | |
let ciphertext; |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
/* | |
* webCrawl.js | |
* this program will recursively "wget" api-documentation | |
* from https://developer.github.com/v3/index.html to 2-level-depth | |
* | |
* example usage: | |
* $ node webCrawl.js eager # eager mkdirSync before writeFile | |
* $ node webCrawl.js lazy # lazy mkdirSync after writeFile failure | |
* | |
* example output: |
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
<script src="a00.js"></script> |
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
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap" rel="stylesheet"> | |
<style> | |
div { | |
font-family: 'Source Sans Pro'; | |
font-size: 80px; | |
font-weight: 700; | |
height: 132px; | |
line-height: 44.3636px; | |
background: #FFE70B; | |
width: 200px; |
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
/* jslint utility2:true */ | |
(function () { | |
/* | |
* this function will provide a binary-min-heap in javascript | |
*/ | |
"use strict"; | |
let heapCreate; | |
let heapDecreaseKey; | |
let heapDelete; | |
let heapHeapify; |
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
shScreencastToGif () {(set -e | |
# this function will convert quicktime.mov $1 to animated gif $2 | |
# https://gist.github.com/dergachev/4627207 | |
# https://gist.github.com/baumandm/1dba6a055356d183bbf7 | |
ffmpeg -y -i "$1" -vf fps=10,palettegen /tmp/palette.png | |
ffmpeg -i "$1" -i /tmp/palette.png -filter_complex "fps=10,paletteuse" "$2" | |
)} |