Skip to content

Instantly share code, notes, and snippets.

Justin Bennett zephraph

Block or report user

Report or block zephraph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zephraph / color-test.js
Created Jul 3, 2019
Test color algorithms
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")
zephraph / parse-colors.js
Last active Jul 3, 2019
Parsed GitHub label colors
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
zephraph / fetch-colors.js
Last active Jul 3, 2019
Github label color scrape
View fetch-colors.js
// Uses wdio to run
const fs = require("fs");
const colors = fs
const pages = => `${color.slice(1)}`);
zephraph / colors.txt
Created Jul 3, 2019
Color test range
View colors.txt
zephraph /
Last active May 15, 2019
A shell script to clean up all node_modules in projects that haven't been touched in a couple weeks.
node_modules=$(find $SEARCH_PATH -name "node_modules" -type d -prune)
View SketchSystems.spec
tabActivated -> SetTimer
tabDeactivated -> TimerPaused
timerExpired -> TimerWaitingToReset
timerReset -> TabTimerTicking
deactivateTimers -> NotStarted
tabActivated -> TabTimerTicking
View gist:56186b0460512051a1b9b38cd06c80ce
### Keybase proof
I hereby claim:
* I am zephraph on github.
* I am zephraph ( on keybase.
* I have a public key ASD1RxP1w5y9jQgHhB6PxWD5KmyzeRSyO0CG2C4gMdiAFQo
To claim this, I am signing this object:
zephraph / pre-commit
Last active Mar 11, 2018
Git hook for automatically switching between work/oss accounts depending on the directory
View pre-commit
# 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 <Your name>", shell=True)
zephraph / streamify.js
Created Aug 19, 2016
Streamify the things
View streamify.js
const streamify = (tree) =>
filter(key => tree.hasOwnProperty(key)),
map(key => ({
[`${key}$`]: typeof tree[key] === 'function' && typeof tree[key].then === 'function'
? (...args) => K.fromPromise(tree[key].apply(null, args))
: typeof tree[key] === 'object'
? streamify(tree[key])
: tree[key]
zephraph / SassMeister-input-HTML.html
Created Feb 13, 2016
Generated by
View SassMeister-input-HTML.html
<div class="capsule">
<header class="capsule__header">
<h1 class="capsule__headline">What We're Loving Now</h1>
<a class="capsule__cta" href="#">See More!</a>
<p class="capsule__description">A few of the things we like</p>
<section class="capsule__content">
You can’t perform that action at this time.