Skip to content

Instantly share code, notes, and snippets.

@KritikaSharmaKS
KritikaSharmaKS / send-email.js
Created November 23, 2020 03:29
Send Emails from within your Node.js Application Using Nodemailer and SendGrid
const nodemailer = require('nodemailer');
const sendgridTransport = require('nodemailer-sendgrid-transport');
const transport = nodemailer.createTransport(sendgridTransport({
auth: {
api_key: 'paste-your-api-key-here'
}
}))
transport.sendMail({
@KritikaSharmaKS
KritikaSharmaKS / sharp-examples.js
Created November 21, 2020 22:40
Process Images with SharpJS | Image cropping, enhance quality, reduce image size, and more...
const sharp = require("sharp");
sharp("Niagara-Falls-Casinos.jpg")
.resize({ width: 250, height: 350 })
.greyscale()
.grayscale()
.negate(false)
.blur()
.toFile("output1.jpg");
@KritikaSharmaKS
KritikaSharmaKS / CHANGELOG.md
Created October 9, 2020 23:24
Sample CHANGELOG.md

Changelog

All notable changes to this project will be documented in this file.

Released

Semantic Version | Release 20XX | YYYY-MM-DD

Added

  • For any new features that have been added since the last version was released
  • [Issue Number](Link to your ISSUE) | Added this.
@KritikaSharmaKS
KritikaSharmaKS / printPDF.html
Created September 17, 2020 02:08
Add a button to print a PDF file located on your hosting server.
<button type="button" onclick="printJS('docs/printjs.pdf')">
Print PDF
</button>