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 oldDate = Date; | |
| Date = function () { | |
| var args = arguments.length > 0 ? Array.prototype.slice.call(arguments) : [1293861600]; | |
| if (typeof args[0] === 'string') { | |
| args = ["'" + args[0] + "'"]; | |
| } | |
| return new Function('return new oldDate(' + args.join(',') + ');')(); | |
| } |
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 dgram = require('dgram'); // dgram is UDP | |
| // Listen for responses | |
| function listen(port) { | |
| var server = dgram.createSocket("udp4"); | |
| server.on("message", function (msg, rinfo) { | |
| console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port); | |
| }); |
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
| description "redis server" | |
| start on runlevel [2345] | |
| stop on shutdown | |
| exec /usr/local/bin/redis-server /etc/redis/redis.conf | |
| respawn |