Skip to content

Instantly share code, notes, and snippets.

@kegsay
kegsay / gendoc.sh
Last active October 17, 2022 09:25
Generate static docs for a Go package
#!/bin/bash
set -u
DOC_DIR=godoc
PKG=github.com/matrix-org/go-neb
# Run a godoc server which we will scrape. Clobber the GOPATH to include
# only our dependencies.
GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 &
DOC_PID=$!
// botClient is a MatrixClient with the bot credentials
var sl = new StateLookup({
client: botClient,
eventTypes: ["m.room.member"]
});
sl.trackRoom("!sfuhweiufhweuif:localhost").then(function() {
var memberEvent = sl.getState("!sfuhweiufhweuif:localhost", "m.room.member", "@someuser:localhost");
});
@kegsay
kegsay / closure.md
Created May 26, 2015 08:38
Closure compiler external requires

Closure compiler external requires

This document outlines modifications to how the compiler processes CommonJS require calls.

Reason for change

These changes are desirable in order to allow Node.js modules to be either included or excluded from the compiler.