Skip to content

Instantly share code, notes, and snippets.

@KarolKski
KarolKski / handler.js
Last active April 28, 2023 05:18
AWS Lambda handler for checking expiration date of SSL certificates
const fs = require('fs');
const axios = require('axios');
const checkCertExpiration = require('check-cert-expiration');
const twilioClient = require('twilio')(accountSid, authToken);
const accountSid = process.env.TWILIO_ACCOUNT_SID // Your Account SID from www.twilio.com/console
const authToken = process.env.TWILIO_AUTH_TOKEN // Your Auth Token from www.twilio.com/console
const phoneNumber = process.env.MOBILE_NUMBER_SMS // Phonenumber to send SMS to
const ourNumber = process.env.TWILIO_OUR_NUMBER // Phonenumber to send SMS from
const endpointChatUrl = process.env.ROCKET_LOG_URL // RocketChat webhook URL for sending messages to chat
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"