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 modulePath = "../node_modules/", | |
Postgres = function() { | |
this.connectionString = "#########################" | |
return this | |
} | |
Object.assign( Postgres.prototype, { | |
_copyTo: require(modulePath+'pg-copy-streams').to, |
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
require('request')( | |
require('util').format( 'http://www.claritin.com/webservice/allergyforecast.php?zip=%s', postalCode ), | |
( err, response, body ) => { | |
if( err ) throw new Error( err ) | |
body = body.replace(/\\/g, "") | |
try { body = JSON.parse( body.substr( 2, body.length - 3 ) )[0] } catch(e) { return reject(e) } | |
if( ! body ) throw new Error( "Invalid Zip 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
$('<td class="source">').text(row.source) | |
$('<td class="source">').append( | |
$('<a>').attr('href', row.source ).text('Whatever I want to say') ) | |
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 selector = 'input.marketing'; | |
var iframeDocument = $('iframe.survey').get(0).contentWindow.document; | |
var url = document.URL; | |
$( selector, iframeDocument ).val(url); |