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 spawn = require('child_process').spawn | |
| var instance = { | |
| ipAddress: "0.0.0.0" | |
| }; | |
| var awsPreSharedKeyPath = '~/.ssh/aws-preshared-key.pem'; // make sure key has permissions 600 with chmod | |
| var spawnArgs = [ '-tt', // force teletype since ssh uses a psuedo-terminal |
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
| ' public domain | |
| Option Explicit | |
| Private FOut% | |
| Private buf() As Byte | |
| Private bufp&, cur&, bit% | |
| Public Sub BitWriter_Init(FO%) | |
| ReDim buf(4095) | |
| FOut = FO |
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
| /*global require */ | |
| // Illustration-only for a mailing list discussion - not a recommended pattern | |
| // for production because of root usage. Untested. | |
| // http://groups.google.com/group/nodejs/browse_thread/thread/b41ad5d727d8dff8 | |
| // usage example: | |
| // node thisfile.js local server:create | |
| // node thisfile.js local server:stop <IP> | |
| // node thisfile.js local server:start <IP> |
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 types = { | |
| '.3gp' : 'video/3gpp', | |
| '.a' : 'application/octet-stream', | |
| '.ai' : 'application/postscript', | |
| '.aif' : 'audio/x-aiff', | |
| '.aiff' : 'audio/x-aiff', | |
| '.asc' : 'application/pgp-signature', | |
| '.asf' : 'video/x-ms-asf', | |
| '.asm' : 'text/x-asm', | |
| '.asx' : 'video/x-ms-asf', |
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
| // Copyright 2009 Ryan Dahl <ry@tinyclouds.org> | |
| #include <v8.h> | |
| #include <node.h> | |
| #include <node_os.h> | |
| #include <sys/types.h> | |
| #include <sys/time.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <assert.h> |
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
| // Copyright 2009 Ryan Dahl <ry@tinyclouds.org> | |
| #ifndef SRC_OS_H_ | |
| #define SRC_OS_H_ | |
| #include <node.h> | |
| #include <v8.h> | |
| #include <sys/types.h> | |
| #include <pwd.h> /* getpwuid() */ | |
| #include <grp.h> /* getgrgid() */ |
NewerOlder