Skip to content

Instantly share code, notes, and snippets.

Tamzin Blake tamzinblake

Block or report user

Report or block tamzinblake

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
View keybase.md

Keybase proof

I hereby claim:

  • I am tamzinblake on github.
  • I am tamzinblake (https://keybase.io/tamzinblake) on keybase.
  • I have a public key ASBD5jtSf-iHLauhV9Cj_JGKuY8LVbRxzlfNuMZNqPA9Lgo

To claim this, I am signing this object:

@tamzinblake
tamzinblake / npx-osx.md
Created Jun 9, 2017
How to get npx shell auto fallback working on OSX bash
View npx-osx.md

OSX ships with bash 3 by default, but you need bash 4 to use npx shell auto fallback. Using homebrew:

(instructions borrowed from https://github.com/Homebrew/homebrew-command-not-found)

brew update && brew install bash
# Add the new shell to the list of allowed shells
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
# Change to the new shell
chsh -s /usr/local/bin/bash
@tamzinblake
tamzinblake / package.json
Created May 26, 2017
package.json dependencies
View package.json
"dependencies": {
"bower": "^1.7.9",
"broccoli-asset-rev": "^2.5.0",
"broccoli-export-tree": "0.3.2",
"broccoli-jscs": "^2.0.0",
"codemirror": "^5.22.2",
"ember-a11y": "0.1.13",
"ember-ajax": "^2.5.6",
"ember-assign-helper": "^0.1.1",
"ember-autoresize": "^0.5.22",
View package_lock.json
{
"name": "pagerduty",
"version": "0.1.63",
"lockfileVersion": 1,
"dependencies": {
"abbrev": {
"version": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU="
},
"accepts": {
View package_lock.json
{
"name": "pagerduty",
"version": "0.1.63",
"lockfileVersion": 1,
"dependencies": {
"abbrev": {
"version": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
"integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU="
},
"accepts": {
View lockfile.diff
=> $ git diff
diff --git a/package-lock.json b/package-lock.json
index cbbd56d..eacabd3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4340,7 +4340,9 @@
"integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg="
},
"concat-map": {
- "version": "0.0.1"
@tamzinblake
tamzinblake / npm_development_trick.md
Created Sep 23, 2016
A trick for developing npm dependencies
View npm_development_trick.md

If you don't want to go through the trouble of managing npm link you can call your development directory node_modules, like so:

$ mkdir node_modules
$ cd node_modules
$ git clone project1
$ git clone project2

Now if project1 has a dependency on project2 but you want to develop against your local version:

View parse_log_v2.js
var fs = require('fs')
var parse_log = function (log) {
var userPages = {}
var paths = {}
logLines = log.split(/\r?\n/)
logLines.forEach(function (logLine) {
logLineData = logLine.split(/, /)
var userId = logLineData[1]
var pageId = logLineData[2]
View parse_log.js
var fs = require('fs')
var parse_log = function (log) {
var userPages = {}
logLines = log.split(/\r?\n/)
logLines.forEach(function (logLine) {
logLineData = logLine.split(/, /)
var userId = logLineData[1]
var pageId = logLineData[2]
if (userId !== undefined && pageId !== undefined) {
@tamzinblake
tamzinblake / gist:d7bcbd10e63950d70ae9
Last active Aug 29, 2015
+ at the beginning of a line problematically
You can’t perform that action at this time.