- airplay-mdns-server - Advertise an AirPlay server on the network
- raop-mdns-server - Advertise a RAOP server on the network
- raop-stub - Create a fake RAOP server on the network
- rtsp-stream - Parse RTSP streams
- rtsp-server - A low level module for creating RTSP servers
- raop-server - A low level module for creating RAOP servers (WIP - for now, see raop-rtsp-server or rtsp-server instead)
- airplay-server - A low level module for creating AirPlay servers
- airplay-txt - WIP
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
(libuv) Failed to create kqueue (24) | |
(libuv) Failed to create kqueue (24) | |
events.js:72 | |
throw er; // Unhandled 'error' event | |
^ | |
Error: write EBADF | |
at errnoException (net.js:905:11) | |
at WriteStream.Socket._write (net.js:646:26) | |
at doWrite (_stream_writable.js:226:10) |
The standard code style linter is a great tool by Feross - check it out!
Remove trailing semicolons:
find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;
Ensure space between function
and opening bracket:
Find all files excluding a single directory:
find . -path ./exclude-this -prune -o -type f -name '*.js' -print
Notes:
- The
-path ./exclude-this -prune -o
part ensures that the path./exclude-this
isn't included - The
-print
part ensures that the base directory of the excluded path isn't outputtet (this isn't needed if combining with-exec
)
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 http = require('http') | |
var asyncState = require('async-state') | |
process.on('uncaughtException', function (err) { | |
if (asyncState.req) { | |
console.log('An error occurred while processing request for', asyncState.req.url) | |
} else { | |
console.log('An error occurred outside of an HTTP request') | |
} | |
}) |
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
~stackman% standard --version | |
4.3.1 | |
~stackman% standard | |
~stackman% mkdir /tmp/stackman | |
~stackman% cp -pr . /tmp/stackman | |
~stackman% cd /tmp/stackman | |
~stackman% standard | |
standard: Use JavaScript Standard Style (https://github.com/feross/standard) | |
/private/tmp/stackman/err1.js:1:13: Extra semicolon. | |
/private/tmp/stackman/err1.js:3:29: Extra semicolon. |
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
function isArray(ar) { | |
return Array.isArray(ar) || | |
(typeof ar === 'object' && objectToString(ar) === '[object Array]'); | |
} |
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
// the data | |
var arr = ['foo', 'bar', 'baz']; | |
// the formal way | |
arr.filter(function (elm) { | |
return /a/.test(elm); | |
}); | |
// the one-liner | |
arr.filter(RegExp.prototype.test.bind(/a/)); |