Skip to content

Instantly share code, notes, and snippets.

View brew's full-sized avatar
🚀
Floating through space

Brook Elgie brew

🚀
Floating through space
View GitHub Profile
@brew
brew / bash
Created September 12, 2017 12:05
brew@Brooks-iMac(venv:ukds_pilot): ~/virtualenvs/ukds_pilot/src/ukds_pilot on master [!?]
$ data login
? Login with... Github
> Opening browser and waiting for you to authenticate online
> Token and user info saved in `~/.datahub.json`
brew@Brooks-iMac(venv:ukds_pilot): ~/virtualenvs/ukds_pilot/src/ukds_pilot on master [!?]
$ data info core/house-prices-us
(node:20852) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: ENOENT: no such file or directory, lstat 'core/house-prices-us'
(node:20852) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@brew
brew / git_diff_exclude.sh
Last active October 16, 2018 08:51
git diff with exlusion patterns
git diff -- . ":(exclude,glob)**/*.map" ":(exclude,glob)**/*.css"
@brew
brew / example_questionset_schema.js
Last active January 16, 2017 15:28
An example Question Set Schema for Open Data Surveys
[
{
// The question is "Do you like apples?"
"id": "like_apples",
"position": 1,
"defaultProperties": {
"visible": true,
"enabled": true,
"required": true
}
@brew
brew / prepare-commit-msg
Last active August 29, 2015 14:07
Prepend issue number (from branch name) to commit message
#!/bin/sh
#
# Automatically add branch name and branch description to every commit message
# except merge commit.
#
COMMIT_EDITMSG=$1
addBranchName() {
BRANCH_NAME=$(git symbolic-ref --short HEAD)

Keybase proof

I hereby claim:

  • I am brew on github.
  • I am brew (https://keybase.io/brew) on keybase.
  • I have a public key whose fingerprint is 6F51 C2D7 5F5B 363D 2271 CD77 FC9B C2C6 1A86 0920

To claim this, I am signing this object:

def altCompileGlyph(font, glyphName, baseName, accentNames, adjustWidth=False, printErrors=True):
"""Compile components into a new glyph using components and anchorpoints.
font: the font
glyphName: the name of the glyph where it all needs to go
baseName: the name of the base glyph
accentNames: a list of accentName, anchorName tuples, [('acute', 'top'), etc]
"""
anchors = {}
errors = {}
baseGlyph = font[baseName]