Skip to content

Instantly share code, notes, and snippets.

View tomorgan's full-sized avatar

Tom Morgan tomorgan

View GitHub Profile
@tomorgan
tomorgan / find_incidents_snow_node.js
Created March 6, 2024 12:40
Amazon Connect - Find Incidents in SNOW
const https = require('https');
const AWS = require('aws-sdk');
var ssm = new AWS.SSM();
var params;
var username;
var password;
var host;
var userId;
var response;
import React, {useEffect } from 'react';
function App() {
  useEffect(() => {
    const script = document.createElement('script');
    script.type = 'text/javascript';
    script.innerHTML = `
  YOUR WIDGET SCRIPT HERE ( remove the <script></script> tags at the top and bottom )
    `;
    document.body.appendChild(script);
@tomorgan
tomorgan / TeamsNation-ACSTEamsMeetingJoinDemo
Created March 16, 2022 13:48
Teams Nation - ACS Teams Meeting Join Demo
import './App.css';
import { AzureCommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';
import {
CallAdapter,
createAzureCommunicationCallAdapter,
fromFlatCommunicationIdentifier,
CallComposite
} from '@azure/communication-react';
import React, { useEffect, useMemo, useState } from 'react';
import { unstable_renderSubtreeIntoContainer } from 'react-dom';
@tomorgan
tomorgan / clock.html
Created February 24, 2022 09:37 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
<!DOCTYPE html>
<html>
<head>
<title>Learn ASC Day 16 - Getting Diagnostic Information on a Call</title>
</head>
<body>
<h2>Learn ASC Day 16 - Getting Diagnostic Information on a Call</h2>
<p>Call state <span style="font-weight: bold" id="call-state">-</span></p>
<input id="destination-user-input" type="text" placeholder="ACS User ID to call" value="8:echo123"
import { CallClient, CallAgent } from "@azure/communication-calling";
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
import { Features } from "@azure/communication-calling";
const connectButton = document.getElementById('connect-button');
const disconnectButton = document.getElementById('disconnect-button');
const callStateElement = document.getElementById('call-state');
const destinationUserElement = document.getElementById('destination-user-input');
const networkMessagesListElement = document.getElementById('NetworkMessages');
const mediaMessagesListElement = document.getElementById('MediaMessages');
import { ChatClient, ChatThreadClient, ChatParticipant, CreateChatThreadResult } from "@azure/communication-chat";
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
const connectButton = document.getElementById('connect-button');
const disconnectButton = document.getElementById('disconnect-button');
const userIdElement = document.getElementById('userId');
const createChatThreadButton = document.getElementById('createChatThread');
const destinationGroupElement = document.getElementById('destination-group-input');
const chatContainer = document.getElementById('chat-container');
const chatInputElement = document.getElementById('chat-input');
<!DOCTYPE html>
<html>
<head>
<title>Learn ASC Day 15 - Doing Chat in ACS</title>
</head>
<body>
<h2>Learn ASC Day 15 - Doing Chat in ACS</h2>
<p>Your User ID <span style="font-weight: bold" id="userId">-</span></p>
<input id="destination-group-input" type="text" placeholder="Chat Thread ID"
import { CallClient, CallAgent, DeviceManager, LocalVideoStream, Renderer } from "@azure/communication-calling";
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
const connectButton = document.getElementById('connect-button');
const disconnectButton = document.getElementById('disconnect-button');
const callStateElement = document.getElementById('call-state');
const destinationGroupElement = document.getElementById('destination-group-input');
const startVideoButton = document.getElementById('startvideo-button');
const stopVideoButton = document.getElementById('stopvideo-button');
const refreshRemoteMediaButton = document.getElementById('refreshRemoteMedia-button');
<!DOCTYPE html>
<html>
<head>
<title>Learn ASC Day 14 - Showing Video and Screen Share Content </title>
</head>
<body>
<h2>Learn ASC Day 14 - Showing Video and Screen Share Content</h2>
<p>Call state <span style="font-weight: bold" id="call-state">-</span></p>
<input id="destination-group-input" type="text" placeholder="Microsoft Teams meeting join URL (https://teams.microsoft.com/l/meetup-join/....)"