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 FACILITY_CODE = /(\d+)$/; | |
| var WIEGAND_LENGTH = /^Wiegand (\d+)/i; | |
| function getFacilityCode(format=''){ | |
| let match = format.match(FACILITY_CODE); | |
| if(!match) return undefined; | |
| let code = match[1]; | |
| return parseInt(code); | |
| } |
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
| --- node_modules/npm/lib/utils/git.js 2015-12-09 14:20:29.967240900 -0800 | |
| +++ node_modules/npm/lib/utils/git.js 2015-12-09 14:20:37.271994500 -0800 | |
| @@ -12,6 +12,14 @@ | |
| , git = npm.config.get("git") | |
| , assert = require("assert") | |
| , log = require("npmlog") | |
| + , msys = process.platform === "win32" && (/mingw/i.test(process.env.MSYSTEM)) | |
| + | |
| +function convertArgs (arg) { | |
| + if (msys && /^([A-Za-z]):\\/.test(arg)) { |
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
| #!/bin/sh | |
| cat <EOF >>/etc/rc.conf | |
| syslogd_enable="YES" | |
| syslogd_flags="-sv" | |
| zfs_enable="YES" | |
| # Install packages on first boot | |
| firstboot_pkgs_list="mongodb" |
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 dot2num(dot) | |
| { | |
| var d = dot.split('.'); | |
| return ((((((+d[0])*256)+(+d[1]))*256)+(+d[2]))*256)+(+d[3]); | |
| } | |
| function num2dot(num) | |
| { | |
| var d = num%256; | |
| for (var i = 3; i > 0; i--) |
Should assertions don't register with nodeunit. To makes them so, add a chainable prototype function that ensures that any subsequent should chain has access to the right nodeunit test object for registering its assertions.
Usage:
exports.suite = {
"should pass": function(test) {
value.in(test).should.be.ok();
test.done();
}
}
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
| $ bundle exec rake assets:precompile |
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
| //Customise Backbone.sync to work with Titanium rather than jQuery | |
| Backbone.sync = (function() { | |
| var methodMap = { | |
| 'create': 'POST', | |
| 'read' : 'GET', | |
| 'update': 'PUT', | |
| 'delete': 'DELETE' | |
| }; | |
| var xhr = Ti.Network.createHTTPClient({ timeout: 5000 }); |