Skip to content

Instantly share code, notes, and snippets.

%!PS-Adobe-3.0
%%Creator: (Wojciech Pawlik)
%%BoundingBox: 0 0 600 600
%%EndComments
%%BeginProlog
<< /PageSize [600 600] >> setpagedevice
/Helvetica-Bold findfont 20 scalefont setfont
300 300 translate
1 1 1 setrgbcolor
#!/bin/bash -eu
export PATH="$PWD/node_modules/.bin:$PATH"
name="$1"
shift
args="${*@Q}"
if cmd="$(jq --raw-output --exit-status --arg name "pre$name" '.scripts[$name]' package.json)"; then
echo "> $cmd"
#include <cassert>
#include <cctype>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <vector>
using Incidence = std::bitset<2>;
template <typename T>
import type { Client, Opts, Ret } from "./deps.ts";
export type Api = {
[M in keyof Opts]: (
payload: Opts[M],
signal?: AbortSignal,
) => Promise<Ret[M]>;
};
export const createApi = (client: Client) =>
@wojpawlik
wojpawlik / .editorconfig
Last active October 28, 2020 13:43
Lists methods without TypeScript typings.
# http://editorconfig.org/
root = true
[*]
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
@wojpawlik
wojpawlik / git-ignore
Created October 21, 2017 12:33
Easily add files to .gitignore from shell. Just put it in a directory in your PATH and chmod +x git-ignore
#!/bin/bash
for i in "$@"; do
echo $i
done >> .gitignore