Skip to content

Instantly share code, notes, and snippets.

View recursivecodes's full-sized avatar
😸

Todd Sharp recursivecodes

😸
View GitHub Profile
@recursivecodes
recursivecodes / game.sql
Created February 23, 2022 18:45
game.sql
select *
from game g
order by created_on desc;
const script = document.createElement('script');
script.src = 'https://web-broadcast.live-video.net/1.30.0/amazon-ivs-web-broadcast.js';
script.onload = async () => {
const token = prompt('Enter your IVS Real-Time participant token:');
if (!token) {
console.error('No token provided');
return;
}
const canvas = document.getElementById('gameCanvas');
@recursivecodes
recursivecodes / message_1.js
Last active November 7, 2025 18:05
message_1.json
{
"type" : "", //string: DELETE, INSERT or UPDATE
"value": {} // object containing the relevant properties in our table
}
$ curl -X POST -H "Content-Type: application/json" http://localhost:8080/aqDemo -d '{"name": "Todd", "num": 9}'
@recursivecodes
recursivecodes / creds.txt
Created November 2, 2021 13:03
creds.txt
username1:password1
username2:password2

Intro to Model Context Protocol (MCP)

In this document, we will look at the basics of MCP.

Create Server

  1. Create Project
mkdir demo-mcp-server && cd demo-mcp-server
@recursivecodes
recursivecodes / backup.sh
Last active April 23, 2025 19:17
backup.sh
#!/usr/bin/env bash
source ~/.zshrc
PROFILE_NAME=DEFAULT
BACKUP_NAME=[your_manual_backup_name]
TMP_BACKUP_NAME=$(date +%Y-%m-%d_%H-%M-%S)
echo "Running at ${TMP_BACKUP_NAME}."
echo "Getting previous backup..."

lets create an html file to broadcast to an amazon ivs low-latency channel using the latest version amazon ivs web broadcast sdk. check the documentation for low-latency streaming with the web broadcast sdk and use my existing channel called demo-channel. to retrieve the channel's stream key from the application, create a function that uses this endpoint: https://[redacted]. use tools at your disposal to find the ingest endpoint for this channel. save the file to /path/to/ivs-web-broadcast-demo.html

⠧ Thinking...
🔨 Calling MCP Server tool 'ivs-knowledgebase-retrieve'...
🔎 Sending MCP Server's 'ivs-knowledgebase-retrieve' response to Bedrock...
⠧ Thinking...
🔨 Calling MCP Server tool 'ivs-knowledgebase-retrieve'...
🔎 Sending MCP Server's 'ivs-knowledgebase-retrieve' response to Bedrock...
⠧ Thinking...
🔨 Calling MCP Server tool 'fetch-url'...

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Amazon IVS Broadcaster</title>
<style>
body {
font-family: Arial, sans-serif;
# create a TAR (from within the JDK 11 init image repo)
$ tar cf jdk-12ea-init.tar func.init.yaml pom.xml src Dockerfile
# build the init-image
$ docker build -f Dockerfile-init -t jdk-12ea-init .
# move back to your project directory, then run:
$ fn init --init-image jdk-12ea-init atp-demo-fn-1