This file contains 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
# syntax=docker/dockerfile:1 | |
FROM python:3.8-slim-buster | |
WORKDIR /app | |
ENV ACCEPT_EULA=Y | |
RUN apt-get update -y && apt-get update \ | |
&& apt-get install -y --no-install-recommends curl gcc g++ gnupg unixodbc-dev |
This file contains 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
FROM public.ecr.aws/lambda/python:3.9 | |
COPY . ${LAMBDA_TASK_ROOT} | |
RUN yum update -y \ | |
&& curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo \ | |
&& yum remove unixODBC-utf16 unixODBC-utf16-devel \ | |
&& ACCEPT_EULA=Y yum install -y msodbcsql17 \ | |
&& ACCEPT_EULA=Y yum install -y mssql-tools \ | |
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \ |
This file contains 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
FROM public.ecr.aws/lambda/python:3.8 | |
COPY . ${LAMBDA_TASK_ROOT} | |
RUN yum install -y gcc python27 python27-devel postgresql-devel | |
RUN pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}" | |
CMD [ "app.handler" ] |
This file contains 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('dotenv').config(); | |
const fs = require('fs'), | |
path = require('path'), | |
Handlebars = require('handlebars'), | |
nodemailer = require('nodemailer'), | |
{ google } = require('googleapis'), | |
OAuth2 = google.auth.OAuth2, | |
{ | |
GMAIL_REFRESH_TOKEN, | |
GMAIL_CLIENT_SECRET, |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Sample</title> | |
</head> | |
<body> | |
<h1>Sample email with variable injection, utilizing handlebars library</h1> |
This file contains 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
// ---------------------------------------------------------------------------- | |
// Copyright (c) Microsoft Corporation. | |
// Licensed under the MIT license. | |
// ---------------------------------------------------------------------------- | |
const fetch = require("node-fetch"); | |
let adal = require("adal-node"); | |
const { | |
REACT_APP_TENANT_ID, | |
AZURE_APP_CLIENT_ID, |
This file contains 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 PowerBiService = require("../path/to/powerbi.service.js"); | |
module.exports.getEmbedInfo = async (req, res) => { | |
// Get the details like Embed URL, Access token and Expiry | |
try { | |
let result = await PowerBiService.getEmbedInfo( | |
"", // Workspace Id | |
[""] // Report Id | |
); | |
res.status(result.status).send(result); |
This file contains 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
// Required Packages: | |
// npm install --save powerbi-client powerbi-client-react | |
import React, {useEffect, useState} from 'react' | |
import { PowerBIEmbed } from 'powerbi-client-react'; | |
import { models } from "powerbi-client"; | |
declare const BackendAPI: any; | |
type EmbedConfigResponse = { |