Skip to content

Instantly share code, notes, and snippets.

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 June 9, 2017 20:46
How to get npx shell auto fallback working on OSX bash

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 04:55
package.json dependencies
"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",
{
"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": {
{
"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": {
=> $ 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 September 23, 2016 17:01
A trick for developing npm dependencies

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:

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]
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 August 29, 2015 14:19
+ at the beginning of a line problematically
var a = foo()
+b