-
node modules の アンインストール
$ npm ls # モジュールのリストを見る $ sudo npm uninstall "module name"
-
npm のアンインストール
$ sudo npm uninstall -g
-
node.js のアンインストール
This file contains hidden or 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 ap = Array.prototype; | |
| if (! ap.forEach_) { | |
| ap.forEach_ = function (f) { | |
| for (var i = 0, len = this.length; i < len; i++) { | |
| f(this[i], i); | |
| } | |
| }; | |
| } | |
| if (! ap.grep) { |
This file contains hidden or 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
| function revolverSetUp (config) { | |
| var focus = config.focus || 0, | |
| list = tags(config.doms.list, 'li'), | |
| last = list.length - 1, | |
| lock = false, | |
| pos = function (n) { | |
| if (! isNumber(n)) n = 0; | |
| config.doms.list.style.top = (config.doms.defaultTop - n) + "px"; | |
| }, |
This file contains hidden or 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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use AnyEvent::Pixiv::Download; | |
| use AnyEvent::FIFO; | |
| use Config::Pit qw(pit_get); | |
| use URI; | |
| use URI::QueryParam; | |
| my $WWW_PIXIX_NET = 'http://www.pixiv.net'; |
This file contains hidden or 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 t = new Timer; | |
| // t.setTimeout(function () { | |
| // console.log('start!'); | |
| // }, 250).setInterval(function () { | |
| // var c = t.vars('count'); | |
| // if (c > 10) { | |
| // console.log('finish!'); | |
| // t.stop(); | |
| // return; | |
| // } |
This file contains hidden or 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
| function join (joint) { | |
| joint = joint || ''; | |
| return function () { | |
| return Array.prototype.join.apply(arguments, [ joint ]); | |
| }; | |
| } | |
| join('\n')('<!doctype html>' | |
| , '<head>' | |
| , '<meta charset="utf-8" />' |
This file contains hidden or 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 fs = require('fs'); | |
| module.exports = function parseJSONFile (path, cb) { | |
| if (typeof cb !== 'function') throw('2nd argument must be "Function"'); | |
| try { | |
| fs.readFile(path, 'utf-8', function (err, data) { | |
| if (err) throw err; | |
| cb(JSON.parse(data)); | |
| }); | |
| } catch (e) { throw e; } | |
| }; |
This file contains hidden or 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 http, url, path; | |
| http = require('http'); | |
| url = require('url'); | |
| path = require('path'); | |
| function httpRequest (/* getURL, method, options, onResponse */) { | |
| var that, watcher, helper, | |
| args, getURL, uri, uriPath, method, options, headers, body, requestOptions; |
This file contains hidden or 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 Iconv, iconv, httpRequest; | |
| httpRequest = require('httpclient').httpRequest; | |
| Iconv = require('iconv').Iconv; | |
| //iconv = new Iconv('SHIFT_JIS', 'UTF-8//TRANSLIT//IGNORE'); | |
| iconv = new Iconv('CP932', 'UTF-8//TRANSLIT//IGNORE'); | |
| function gsURL (uri) { | |
| return function (_uri) { | |
| if (_uri && _uri !== uri) uri = _uri; |
This file contains hidden or 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 events,http, url, path; | |
| events = require('events'); | |
| http = require('http'); | |
| url = require('url'); | |
| path = require('path'); | |
| var agents = {}; | |
| agent.onSocketsLengthChange; | |
| if (http.getAgent) { |