This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var tar = require('tar'); | |
var zlib = require('zlib'); | |
var semver = require('semver'); | |
var RegClient = require('npm-registry-client'); | |
var client = new RegClient(); | |
function latestVersion(list) { | |
return list.reduce(function (biggest, cur) { | |
if (semver.gt(cur, biggest)) { | |
return cur; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var Promise = require(path.join(__dirname,"lib","npo.src.js")); | |
var unHandled = []; | |
var count = { | |
handled: 0, | |
unhandled: 0 | |
}; | |
process.on('rejectionHandled', function (promise) { | |
var index = unHandled.indexOf(promise); | |
unHandled.splice(index, 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var targz = require('tar.gz'); | |
var semver = require('semver'); | |
var JSONStream = require('JSONStream'); | |
var concat = require('concat-stream'); | |
var file = process.argv[2]; | |
var dir = process.argv[3] || process.cwd(); | |
function fetchUnpack(url, dir) { | |
request(url).pipe(targz().createWriteStream(dir)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='container'> | |
Bookmarklets: | |
Simply click and drag the link to your bookmarks bar. | |
<ul class='list'> | |
<li><a href="javascript:document.body.contentEditable='true'; document.designMode='on'; void 0">Edit</a></li> | |
<li><a href="javascript:document.body.contentEditable='false'; document.designMode='off'; void 0">Unedit</a></li> | |
<li><a href="javascript:(function(){var a = prompt('What file?');var b=document.createElement('script');b.src=a;document.body.appendChild(b);}())">Add scripts</a></li> | |
<li><a href="javascript:(function () { | |
function getSelectionText() { | |
var text = ''; |
NewerOlder