- Update
package.json
, setversion
to a canary version, e.g.2.0.0-canary-<PR#>
,3.1.5-canary-<PR#>
, ... - Run
npm publish --tag canary
to publish the package under thenext
tag - Run
npm install --save @artsy/reaction@canary
to install canary package
View npm-canary.md
View github-event-router.ts
import { NowRequest, NowResponse } from "@now/node"; | |
import { http, https } from "follow-redirects"; | |
import { URL } from "url"; | |
export = (request: NowRequest, response: NowResponse) => { | |
console.log(request.headers); | |
const event = request.headers["x-github-event"]; | |
if (!event) return response.status(404).end(); | |
const url = new URL(`https://${request.headers.host}/${request.url}`); |
View color-test.js
// uses mocha | |
const { rgb } = require("wcag-contrast"); | |
const fromHex = require("@fantasy-color/from-hex").default; | |
const fs = require("fs"); | |
const assert = require("assert"); | |
const parsedColors = fs | |
.readFileSync(__dirname + "/../parsed-colors.txt") | |
.toString() | |
.split("\n") |
View fetch-colors.js
// Uses wdio to run | |
const fs = require("fs"); | |
const colors = fs | |
.readFileSync("./colors.txt") | |
.toString() | |
.split("\n"); | |
const pages = colors.map(color => `https://github.com/zephraph/test/labels/preview/TEXT?color=${color.slice(1)}`); |
View parse-colors.js
const fs = require("fs"); | |
const fromRGB = require("@fantasy-color/from-rgb").default; | |
const hex = color => color.toString(16).padStart(2, "0"); | |
const rgbToHex = rgb => { | |
const { red, green, blue } = fromRGB(rgb); | |
return `#${hex(red)}${hex(green)}${hex(blue)}`; | |
}; | |
const colors = fs |
View colors.txt
#000000 | |
#000f17 | |
#001e1c | |
#002b00 | |
#0037ca | |
#004473 | |
#005160 | |
#005e53 | |
#006b3d | |
#007800 |
View clean.sh
#!/bin/bash | |
DAYS_SINCE_LAST_CHANGE=14 | |
SEARCH_PATH="./Git" | |
TOTAL_BYTES_REMOVED=0 | |
Mb=1000000 | |
Kb=1000 | |
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune) |
View SketchSystems.spec
TabTimerState | |
NotStarted | |
tabActivated -> SetTimer | |
TabTimerTicking | |
tabDeactivated -> TimerPaused | |
timerExpired -> TimerWaitingToReset | |
timerReset -> TabTimerTicking | |
deactivateTimers -> NotStarted | |
TimerPaused | |
tabActivated -> TabTimerTicking |
View gist:56186b0460512051a1b9b38cd06c80ce
### Keybase proof | |
I hereby claim: | |
* I am zephraph on github. | |
* I am zephraph (https://keybase.io/zephraph) on keybase. | |
* I have a public key ASD1RxP1w5y9jQgHhB6PxWD5KmyzeRSyO0CG2C4gMdiAFQo | |
To claim this, I am signing this object: |
View pre-commit
#!/usr/bin/python | |
# This file should live at ~/.git/hooks | |
import os | |
from subprocess import call | |
if "git/work" in cwd: | |
print "Using work account" | |
call("git config user.name <Your name>", shell=True) |
NewerOlder