# apt-cache show node
N: Can't select versions from package 'node' as it is purely virtual
N: No packages found

# apt-cache show nodejs
Package: nodejs
Priority: extra
Section: universe/web
Installed-Size: 12930
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Architecture: amd64
Version: 4.2.6~dfsg-1ubuntu4.1
Provides: nodejs-abi-46
Depends: libc6 (>= 2.15), libgcc1 (>= 1:3.4), libicu55 (>= 55.1-1~), libssl1.0.0 (>= 1.0.2~beta3), libstdc++6 (>= 5.2), libuv1 (>= 1.6.1), zlib1g (>= 1:1.1.4)
Filename: pool/universe/n/nodejs/nodejs_4.2.6~dfsg-1ubuntu4.1_amd64.deb
Size: 3161040
MD5sum: 7213fe0f524db1488167850252e769a5
SHA1: 3ed9c0b3586c76c9006bc0d9c1575a30d2ba1edf
SHA256: 831033c58c40879af924ac820c8f6295889f2ef8df90ebe41079e0af272390a9
Description-en: evented I/O for V8 javascript
 Node.js is a platform built on Chrome's JavaScript runtime for easily
 building fast, scalable network applications. Node.js uses an
 event-driven, non-blocking I/O model that makes it lightweight and
 efficient, perfect for data-intensive real-time applications that run
 across distributed devices.
 .
 Node.js is bundled with several useful libraries to handle server
 tasks:
 .
 System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
 HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Description-md5: e507fb472d7cdaceffc5b285a62d5c1b
Homepage: http://nodejs.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Package: nodejs
Priority: extra
Section: universe/web
Installed-Size: 12930
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Architecture: amd64
Version: 4.2.6~dfsg-1ubuntu4
Provides: nodejs-abi-46
Depends: libc6 (>= 2.15), libgcc1 (>= 1:3.4), libicu55 (>= 55.1-1~), libssl1.0.0 (>= 1.0.2~beta3), libstdc++6 (>= 5.2), libuv1 (>= 1.6.1), zlib1g (>= 1:1.1.4)
Filename: pool/universe/n/nodejs/nodejs_4.2.6~dfsg-1ubuntu4_amd64.deb
Size: 3161636
MD5sum: 4b20acbf1f01cb13661ce50eb7b62c1d
SHA1: cd2b863329d135f3c32b54b22a0c52e765355a1d
SHA256: b8b6a9d9dafa004a8574a7d4eed987a8ee175059fb0946ebb81c21780b19503b
Description-en: evented I/O for V8 javascript
 Node.js is a platform built on Chrome's JavaScript runtime for easily
 building fast, scalable network applications. Node.js uses an
 event-driven, non-blocking I/O model that makes it lightweight and
 efficient, perfect for data-intensive real-time applications that run
 across distributed devices.
 .
 Node.js is bundled with several useful libraries to handle server
 tasks:
 .
 System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
 HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Description-md5: e507fb472d7cdaceffc5b285a62d5c1b
Homepage: http://nodejs.org/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

[ ]
 

Нужно её ЗАКОДИРОВАТЬ. И тогда она, блядь, раскодируется.

iconv = require 'iconv-lite'
fileName = '%D0%90%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D0%BF%D1%80%D0%B0%D0%B9%D1%8111.08.15.xls'
fileName = unescape(fileName)
console.log fileName
fileName = iconv.encode(fileName,'iso8859-1')
console.log fileName.toString()

Причина ошибки:
Вялотекущая шизофрения.
Как починить:
Вызывать методы без аргументов, используя вместо параметра null и только null.

soap = require 'soap'
soap.createClient(
  'https://api.schizophrenia.gov', 
  (err, client) ->
    client.setSecurity(new soap.BasicAuthSecurity('login','password'))
    client.GetBrokenNeuronsList(
      null
      ,
      (err, result) ->
        console.log(result)
    )
)
[ ]
 

N"OWw RIWWITNHK AAAAAARR DER PROTOROPYTEP PORPERTY>111..
Unfolded:

events = require "events"

instances_counter = 0
module.exports = (
  -> 
    __class = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __class
        @constructor?.apply(@,__args) if __class isnt @constructor;@
      else 
        new (Function.prototype.bind.apply(__class,[null].concat(__args)))
    );
    __class.prototype = if @prototype? then Object.create(@prototype.prototype) else @;
    __class.prototype[__prop] = @[__prop] for __prop of @ if @prototype?;
    __class).apply

  prototype: events.EventEmitter

  constructor: (@param1,@param2) ->
    @prototype.apply @
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

a = new module.exports()
a.render()
b = new module.exports()
b.render()
console.log a instanceof events.EventEmitter
console.log a instanceof module.exports

Folded:

events = require "events"

instances_counter = 0
module.exports = (-> __class = (-> __args = Array.prototype.slice.call(arguments); if @ instanceof __class then @constructor?.apply(@,__args) if __class isnt @constructor;@ else new (Function.prototype.bind.apply(__class,[null].concat(__args)))); __class.prototype = (if @prototype? then Object.create(@prototype.prototype) else @); (__class.prototype[__prop] = @[__prop] for __prop of @ if @prototype?); __class).apply

  prototype: events.EventEmitter

  constructor: (@param1,@param2) ->
    @prototype.apply @
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

a = new module.exports()
a.render()
b = new module.exports()
b.render()
console.log a instanceof events.EventEmitter
console.log a instanceof module.exports
[ ]
 

Кавычечки. Кавычечки. Вместо одинарных случайно поставил двойные, автозаменой. Кавычечки он не любит. Пиздец.

Было:

#!/bin/bash
###
NODE_VERSION=">=0.11.13"
if [ -z $(which node) ]; then echo "ERROR: NODE.JS NOT FOUND"; exit 1; fi
if [ -z $(which coffee) ]; then echo "ERROR: COFFEESCRIPT NOT FOUND"; exit 1; fi
if [ "$(node -p "require('semver').satisfies(process.version,'$NODE_VERSION')")" != "true" ]; then echo "ERROR: INCOMPATIBLE NODE VERSION"; exit 1; fi
echo "Starting Coffee"; node --harmony $(which coffee) "$0" -- "$@"
exit
###
console.log "pizdos..."
console.log process.argv

Стало:

#!/bin/bash
###
NODE_VERSION=\>=0.11.13
if [ -z $(which node) ]; then echo ERROR: NODE.JS NOT FOUND; exit 1; fi
if [ -z $(which coffee) ]; then echo ERROR: COFFEESCRIPT NOT FOUND; exit 1; fi
if [ $(node -p require\(\'semver\'\).satisfies\(process.version,\'$NODE_VERSION\'\)) != true ]; then echo ERROR: INCOMPATIBLE NODE VERSION; exit 1; fi
echo Starting Coffee; node --harmony $(which coffee) $0 -- $@
exit
###
console.log "pizdos..."
console.log process.argv

ТЕПЕРЬ БОЛЬШЕ НИКАКИХ вложенных КАВЫЧЕЧЕК БЛЯДЬ! КОКАЯ КРОСОТА! МОЖНО ТЕПЕРЬ И ПОРАБОТАТЬ, НО ЧТО-ТО НЕ ХОЧЕТСЯ.
А вот ну совсем-совсем без кавычечек:

#!/bin/bash
###
NODE_VERSION=\>=0.11.13
if [ -z $(which node) ]; then echo ERROR: NODE.JS NOT FOUND; exit 1; fi
if [ -z $(which coffee) ]; then echo ERROR: COFFEESCRIPT NOT FOUND; exit 1; fi
if [ $(node -p require\(String\(/semver/\).substring\(1,7\)\).satisfies\(process.version,String\(/$NODE_VERSION/\).substring\(1\).slice\(0,-1\)\)) != true ]; then echo ERROR: INCOMPATIBLE NODE VERSION; exit 1; fi
echo Starting Coffee; node --harmony $(which coffee) $0 -- $@
exit
###
console.log "pizdos..."
console.log process.argv

МЕНЬШЕ КАВЫЧЕК БОБУ НЕКАВЫЧКИНУ

[ ]
 

Симптомы:

{ [Error: SQLITE_BUSY: database is locked] errno: 5, code: 'SQLITE_BUSY' }

Лечение:

db().configure("busyTimeout", 60000)
[ ]
 
npm list co
[ ]
 

Симптомы:
При npm install sqlite3 вывавливается

node-pre-gyp install --fallback-to-build

Лечение:

apt-get install make g++
[ ]
 

Folded:

instances_counter = 0
module.exports = ( -> __class = (-> __args = Array.prototype.slice.call(arguments); if @ instanceof __class then @constructor?.apply(@,__args);@ else new (Function.prototype.bind.apply(__class,[null].concat(__args)))); __class.prototype = @; __class).apply

  constructor_not_required_anymore: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Unfolded:

instances_counter = 0
module.exports = (
  -> 
    __class = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __class 
        @constructor?.apply(@,__args);@
      else 
        new (Function.prototype.bind.apply(__class,[null].concat(__args)))
    );
    __class.prototype = @;
    __class).apply

  constructor_not_required_anymore: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports
[ ]
 

Folded:

instances_counter = 0
module.exports = (-> __constructor = (-> if @ instanceof __constructor then @constructor.apply(@,Array.prototype.slice.call(arguments)) else new (Function.prototype.bind.apply(__constructor,[null].concat(Array.prototype.slice.call(arguments))))); __constructor.prototype = @; __constructor).apply

  constructor: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Unfolded:

instances_counter = 0
module.exports = (
  -> 
    __constructor = (-> 
      __args = Array.prototype.slice.call(arguments)
      if @ instanceof __constructor 
        @constructor.apply(@,__args) 
      else 
        new (Function.prototype.bind.apply(__constructor,[null].concat(__args)))
    );
    __constructor.prototype = @;
    __constructor).apply

  constructor: (@param1,@param2) ->
    console.log "cnstar"
    @id = ++instances_counter

  render: ->
    console.log @,instances_counter,@ instanceof module.exports

Testing:

Class2 = require './class2'

a = Class2('a1','a2')
b = new Class2('b1','b2')
a.render()
b.render()
console.log a instanceof Class2
console.log b instanceof Class2

Output:

$ coffee class3.coffee 
cnstar
cnstar
{ param1: 'a1', param2: 'a2', id: 1 } 2 true
{ param1: 'b1', param2: 'b2', id: 2 } 2 true
true
true
[ ]