- Download this file FirebaseAdminLayer.zip
- Create a Lambda Layer with the downloaded AdminFirebase.zip
- Attach FirebaseAdminLayer to your Lambda Function
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'; | |
const AWS = require('aws-sdk'); | |
const EMAIL = require('./mail.js'); | |
exports.handler = (event, context, callback) => { | |
//HERE YOUR CODE | |
EMAIL.send(); | |
callback(null, ':)'); | |
}; |
This assume you already have a SNS subscription (HTTP endpoint) and configured SES events, if not please go to this link
-
Replace content from serviceAccountKey.json with your own info.
-
Install dependencies
npm install --save express firebase-admin
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
const json2xls = require('json2xls'); | |
const { | |
convertArrayToCSV | |
} = require('convert-array-to-csv'); | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
region: "us-east-1", | |
}); | |
var events = new AWS.DynamoDB.DocumentClient(); |
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 express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
var smpp = require('smpp'); | |
var session = smpp.connect('smpp://10.10.10.10:4331'); | |
session.auto_enquire_link_period = 1000; | |
var didConnect = false; | |
app.use( |
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
import logging | |
import sys | |
import smpplib.gsm | |
import smpplib.client | |
import smpplib.consts | |
from flask import Flask, request, jsonify | |
# from flask_mysqldb import MySQL | |
app = Flask(__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
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
var fs = require("fs"); | |
//=================================== | |
var XLSXChart = require("xlsx-chart"); | |
var xlsxChart = new XLSXChart(); | |
var opts = { |
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
/* jshint esversion:6, bitwise:false, node:true, strict:true */ | |
/* globals msg */ | |
"use strict"; | |
/** | |
* Node-RED function to decode Axioma water meter payloads. | |
* Example assuming that msg.req.body contains an HTTP POST callback from The Things Networks. | |
*/ | |
function statusAxiomaShort(s) { | |
const messages = []; |
-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
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
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
mail_content = '''Hello, | |
This is a simple mail. | |
There is only text, no attachments are there The mail is sent using Python SMTP library. | |
Thank You | |
''' | |
#The mail addresses and password |