Skip to content

Instantly share code, notes, and snippets.

View pimterry's full-sized avatar
👶
50% parental leave, not going to be very responsive for a while

Tim Perry pimterry

👶
50% parental leave, not going to be very responsive for a while
View GitHub Profile
var fs = require("fs");
var express = require("express");
var components = require("server-components");
require("./linkify-example-component.js");
require("./google-analytics-example-component.js");
var html = fs.readFileSync("index.html");
var app = express();
CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" \
PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 \
pyenv install -v 2.7.11

Keybase proof

I hereby claim:

  • I am pimterry on github.
  • I am pimterry (https://keybase.io/pimterry) on keybase.
  • I have a public key whose fingerprint is 6710 FEC7 856D 57B7 E812 76BC 0DDE 38AF D3AF 94F0

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<style>
div:not(:target) {
display: none;
}
div:target {
display: block;
class Thread {
constructor (private github: any, private url: string) /* : Promise<Thread> */ {
let issueMatch = /api.github.com\/repos\/([\-\w]+)\/([\-\w]+)\/issues\/(\d+)/.exec(url);
if (!issueMatch) {
throw new Error(`Received issue notification that didn't match regex: ${url}`);
}
this.repo = new Repo(issueMatch[1], issueMatch[2]);
this.id = parseInt(issueMatch[3], 10);
async function getThread(github: any, url: string): Promise<Thread> {
let issueMatch = /api.github.com\/repos\/([\-\w]+)\/([\-\w]+)\/issues\/(\d+)/.exec(url);
if (!issueMatch) {
throw new Error(`Received issue notification that didn't match regex: ${url}`);
}
let repo = new Repo(issueMatch[1], issueMatch[2]);
let id = parseInt(issueMatch[3], 10);
let comments = await github.issues.getComments({
@pimterry
pimterry / install-bats-libs.sh
Created December 3, 2016 17:34
Set up bats libraries for testing as git submodules in test/libs
mkdir -p test/libs
git submodule add https://github.com/sstephenson/bats test/libs/bats
git submodule add https://github.com/ztombol/bats-support test/libs/bats-support
git submodule add https://github.com/ztombol/bats-assert test/libs/bats-assert
@pimterry
pimterry / addition-test.bats
Created December 3, 2016 17:41
Demo bats test
#!./test/libs/bats/bin/bats
load 'libs/bats-support/load'
load 'libs/bats-assert/load'
@test "Should add numbers together" {
assert_equal $(echo 1+1 | bc) 2
}