Skip to content

Instantly share code, notes, and snippets.

View davglass's full-sized avatar
💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.

Dav Glass davglass

💭
Taking a much needed sabbatical from Open Source. Please fork and carry on.
View GitHub Profile
@davglass
davglass / no-shrinkwrap.txt
Created April 23, 2014 17:53
peerDependencies issue
npm i --no-shrinkwrap
my-app@0.0.0 /Users/davglass/src/peer/app
├─┬ express@3.4.8
│ ├── buffer-crc32@0.2.1
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ ├─┬ connect@2.12.0
│ │ ├── batch@0.5.0
│ │ ├── bytes@0.2.1
npm info it worked if it ends with ok
npm info using npm@1.4.5
npm info using node@v0.10.26
npm info trying registry request attempt 1 at 23:15:18
npm http GET https://registry.npmjs.org/executable?write=true
npm http 200 https://registry.npmjs.org/executable?write=true
npm info starring executable
npm info trying registry request attempt 1 at 23:15:22
npm http PUT https://registry.npmjs.org/executable
npm http 503 https://registry.npmjs.org/executable
var svgLine = require('svg-line')
var raf = require('raf')
var ns = 'http://www.w3.org/2000/svg'
var tau = Math.PI * 2
var svg = document.createElementNS(ns, 'svg')
var line = document.createElementNS(ns, 'path')
var points = []
var path = svgLine()
.x(function(d) { return d.x })
//https://github.com/getify/rawnpm.getify.io/blob/master/server.js#L244
conf.loglevel = "silent";
conf.cache = path.join(__dirname,"npm_cache");
conf.userconfig = path.join(__dirname, ".npmrc");
npm.load(conf, fn);
TAP version 13
# dicovers new versions in outdated
not ok 1 should be equal
---
file: /Users/yui/src/npm2/npm/node_modules/slide/lib/async-map.js
line: 48
column: 11
stack:
- getCaller (/Users/yui/src/npm2/npm/node_modules/tap/lib/tap-assert.js:418:17)
- assert (/Users/yui/src/npm2/npm/node_modules/tap/lib/tap-assert.js:21:16)
@davglass
davglass / gist:6749755
Created September 29, 2013 05:54
The commands I used in the live coding demo of this talk: http://www.slideshare.net/davglass/hacking-with-node-js
The app code is here:
https://github.com/davglass/hack
> hub init //create git repo
> hub create //bind to github.com
> npm init //Create the package.json
> npm install express --save //Install Express
> travis init //Create the .travis.yql file and enable the repo
> heroku apps:create <app> //Create the app
@davglass
davglass / Features.md
Created February 1, 2013 15:21
Proposal for new YUI.Features

New YUI Feature Detection

This is my proposal for revamping the YUI Core Feature detection system.

Problem Space

  • 90% of our so-called "Feature Tests" are actually Loader conditional modules.
  • Some "free-flowing" tests in DOM modules.
@davglass
davglass / gist:4675460
Created January 30, 2013 18:26
Local Gallery Loading.
YUI.applyConfig({
groups: {
gallery: {
combine: false,
root: '/build/',
patterns: {
'gallery-': { },
'lang/gallery-': {},
'gallerycss-': { type: 'css' }
}
mkdir -p ./src/node/meta
cd src
vim node/meta/node.json
//Add contents from below
yogi loader --yes
//The content of the resulting file is below.
yogi test --istanbul --coverage
yogi [info] using yogi@0.0.63 on node@0.8.16
yogi [info] using module: gallery-flickr-carousel
yogi [info] prepping grover tests
yogi [info] adding tests route
yogi [info] turning on coverage support in grover
yogi [info] launching xdr server on port 5021
yogi [info] listening on: http://127.0.0.1:5020
Starting Grover on 1 files with PhantomJS@1.8.0
Running 15 concurrent tests at a time.