Skip to content

Instantly share code, notes, and snippets.

View mobarrio's full-sized avatar

Mariano mobarrio

View GitHub Profile
var nodemailer = require('nodemailer');
var smtpTransport = require('nodemailer-smtp-transport');
var transporter = nodemailer.createTransport(smtpTransport({
host: 'host.nombre.com',
port: 465,
secure: true,
tls: { rejectUnauthorized: false },
debug: false,
logger: false,
@mobarrio
mobarrio / gist:986b5b6876041c04fafa
Created May 7, 2015 19:27
Web Notifications API
if(window.Notification && Notification.permission !== "denied") {
Notification.requestPermission(function(status) { // status is "granted", if accepted by user
var n = new Notification('Title', { body: 'I am the body text!' });
n.onshow = function () {
setTimeout(n.close(), 5000);
}
});
}
Fuente: http://davidwalsh.name/notifications-api
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
owFdUn9oVVUcf8+mzYkRIykqSe5q0Xq+nZ/33rP1YvWsDBYYbksqfZ2f2517977u
fdsaumGLijJCooU4pP4IJXMRomAQwaJaMCOExvpLwhCerRUpFUho546FywMHzvme
z/fz+X6+33Ng/U2Z+uzXIHnikZ2v7M3OXhSZ7tbJsT2OiNSI07bHkQOBDqvpKeRl
7bQ5u/WI4InOB9GmMFI6359sWsbknCEdJ0EUWhTIe3nPGc2l8DTZBGGvjitxkHI5
XFGMuA8A4dQVrg+4JwhmVFIMPEw8AqnysSctZV+UVP+n6ixxlgJlo8Xr+C0WX7Rv
g0sPGDBEpeIUEm6wL33XuMS4TEqpmIEsBSY6XrZU5nHAw6gUCR7HVsGWXdbx7gFd
iqNoybusBikSEsSgjzFktjCe9NlciAVGvm8IlZ4HpRUxGiKPMkpd6Epi1QDzsIIa