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
"use strict"; | |
var fs = require('fs'); | |
var path = require('path'); | |
fs.readdirSync(__dirname + '/model').forEach(function (model_file) { | |
if (/\.js$/.test(model_file)) { | |
var key = model_file.replace(/\.js$/, ''); | |
exports[key] = require(path.join(__dirname, 'model', model_file)); | |
} |
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
#!/usr/bin/perl | |
# use 'swaks --help' to view documentation for this program | |
# | |
# Homepage: http://jetmore.org/john/code/swaks/ | |
# Online Docs: http://jetmore.org/john/code/swaks/latest/doc/ref.txt | |
# http://jetmore.org/john/code/swaks/faq.html | |
# Announce List: send mail to [email protected] | |
# Project RSS: http://jetmore.org/john/blog/c/swaks/feed/ | |
# Google+: https://plus.google.com/u/0/110270727761256449657 |
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
Run with: perl -C uni.pl |
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
// Fixup the email (TODO: we should probably clone the transaction here because we don't want it changed for every RCPT TO) | |
trans.remove_header('List-Unsubscribe'); | |
trans.add_header('List-Unsubscribe', list.email.replace('@', '-unsub@')); | |
trans.remove_header('List-ID'); | |
trans.add_header('List-ID', list.name + " <" + list.email.replace('@', '.') + ">"); | |
trans.remove_header('List-Message-Id'); | |
trans.add_header('List-Message-Id', id); | |
if (list.reply_to_set) { | |
trans.remove_header('Reply-To'); | |
trans.add_header('Reply-To', list.email); |
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
"use strict"; | |
var fs = require('fs'); | |
var cache = {}; | |
var timers = {}; | |
var times = 0; | |
function leak_test (name, cb) { | |
if (cache[name]) { |
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
$ echo 'process.removeAllListeners("uncaughtException");' > /tmp/foo.js | |
$ node /tmp/foo.js | |
[exits normally] |
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
select start_date, end_date from employees where company_id=10; start_date | end_date | |
------------+---------- | |
2013-05-31 | | |
2013-07-09 | | |
2013-07-17 | | |
2013-05-31 | | |
2013-05-31 | | |
2013-05-31 | |
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
diff --git a/connection.js b/connection.js | |
index 3be5f70..c0fa9b8 100644 | |
--- a/connection.js | |
+++ b/connection.js | |
@@ -1105,7 +1105,7 @@ Connection.prototype.cmd_mail = function(line) { | |
var results; | |
var from; | |
try { | |
- results = rfc1869.parse("mail", line); | |
+ results = rfc1869.parse("mail", line, config.get('strict_rfc1869') && !this.relaying); |
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
diff --git a/rfc1869.js b/rfc1869.js | |
index f7835fc..d007bea 100644 | |
--- a/rfc1869.js | |
+++ b/rfc1869.js | |
@@ -21,14 +21,16 @@ | |
var chew_regexp = /\s+([A-Za-z0-9][A-Za-z0-9\-]*(?:=[^= \x00-\x1f]+)?)$/; | |
+exports.strict = false; | |
+ |
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
SELECT periods.end, sum(opportunities.amount) | |
FROM ( | |
SELECT d as start, ((d + CAST('1 month' AS interval)) - CAST('1 day' AS interval))::date as end | |
FROM (SELECT generate_series(date_trunc('month', CAST('2013-01-01' AS date)), | |
date_trunc('month', CAST('2014-01-01' AS date)), | |
CAST('1 month' AS interval))::date AS d) as p | |
) as periods | |
LEFT JOIN Opportunities ON (opportunities.close_date >= periods.start | |
AND opportunities.close_date <= periods.end) | |
WHERE opportunities.employee_external_id='005F0000002PLrBIAW' |