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 bodies | |
var attributes_fetch = imap.fetch(emailId, { | |
struct: true | |
}); | |
attributes_fetch.on('message', function(msg, seqno) { | |
msg.once('attributes', function(attrs) { | |
// just extracts ["HEADER", "1", "1.MIME"] from a message | |
// which has "HEADER" and "1", "2" parts, where "2" is attachment | |
bodies = constructBodies(attrs) |
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
[email protected] /home/outbounder/projects/outbounder/node-thequest | |
├─┬ [email protected] | |
│ ├─┬ [email protected] | |
│ │ └── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├─┬ [email protected] | |
│ │ └── [email protected] | |
│ ├─┬ [email protected] |
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
{ | |
"remote": "[email protected]", | |
"cwd": "~/app", | |
"source": "[email protected]", | |
"origin": "origin", | |
"branch": "develop", | |
"nvmPath": "~/.nvm/nvm.sh", | |
"nodeVersion": "v0.10.24", | |
"start": "forever --sourceDir /home/app -a -l /home/app/app.js.out --minUptime 5000 --spinSleepTime 2000 start app.js", | |
"stop": "forever stop app.js", |
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
/** | |
* Usage: $ node mongodb-sync.js <user>@<ip> <database-name> | |
**/ | |
require("shelljs/global") | |
// prepare remote db | |
var remote_commands = [ | |
"mongodump --db "+process.argv[3]+" --out /tmp/mongodump-sync", | |
"tar -zcvf /tmp/mongodump-sync.tar.gz /tmp/mongodump-sync" | |
] |
In a nutshell it is just the following:
- got a task/requirements/problem which can be solved with a computer
- implement a solution
- see that solution actually works (most of the time)
- see that solution fails in some cases
- iterate from 2) to 5) until the original task/requirement/problem is resolved to its full extend
OlderNewer