Skip to content

Instantly share code, notes, and snippets.

@ksmithut
ksmithut / colors.js
Created July 30, 2020 12:24
Test Framework
/**
* @param {number} open
* @param {number} close
* @returns {(str: string) => string}
*/
function color (open, close) {
const openStr = '\u001b[' + open + 'm'
const closeStr = '\u001b[' + close + 'm'
return str => `${openStr}${str}${closeStr}`
}
@ksmithut
ksmithut / index.html
Last active January 4, 2021 07:15
highlight.js slowness
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
id="theme-link"
rel="stylesheet"
@ksmithut
ksmithut / keybase.md
Created August 20, 2018 17:42
keybase.md

Keybase proof

I hereby claim:

  • I am ksmithut on github.
  • I am tytho (https://keybase.io/tytho) on keybase.
  • I have a public key ASD_nj8OiBmHADE_wB3VX30aUuy7CEQqSEt-tHo2h9ezXQo

To claim this, I am signing this object:

@ksmithut
ksmithut / .dockerignore
Last active April 26, 2024 14:04
Node Docker Compose nodemon
node_modules
@ksmithut
ksmithut / grpc_node_codegen.sh
Created August 3, 2017 19:18
Describes how do to static code gen for grpc
yarn add grpc-tools
# In package.json scripts...
grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:. \
--grpc_out=. \
--plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` \
path/to/proto/file.proto
# Proto Example: https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto