Skip to content

Instantly share code, notes, and snippets.

View georgemck's full-sized avatar
😀

GeorgeMcK georgemck

😀
View GitHub Profile
package com.amazonaws.kvstranscribestreaming;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
import com.amazonaws.kinesisvideo.parser.ebml.InputStreamParserByteSource;
import com.amazonaws.kinesisvideo.parser.ebml.ParserByteSource;
import com.amazonaws.kinesisvideo.parser.mkv.StreamingMkvReader;
import com.amazonaws.kinesisvideo.parser.utilities.FragmentMetadataVisitor;
import com.amazonaws.regions.Regions;
@georgemck
georgemck / ExportLexBots.sh
Last active March 11, 2021 01:28
Bash script to download all your Lex bots.
#!/usr/bin/env bash
# You need to have aws-cli installed and configured
# inspired by https://gist.github.com/TheNetJedi/0847ba0ec1da9879b4fa1d8f3276b004
# command option constants available in the documentation https://docs.aws.amazon.com/lex/latest/dg/API_GetExport.html
mkdir lexbots
aws lex-models get-bots | grep name | cut -d '"' -f4 | \
while read -r name; do
echo $name
url=$(aws lex-models get-export --name $name --resource-type BOT --export-type LEX --resource-version 1 --region us-east-1 --output json | grep url | cut -d '"' -f4)
@georgemck
georgemck / m3u8-to-mp4.md
Created January 10, 2021 09:48 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@georgemck
georgemck / echobuttons1.js
Last active February 12, 2020 20:40 — forked from SamDecrock/echobuttons1.js
Connecting to an Amazon Echo Button
var btSerial = new (require('bluetooth-serial-port')).BluetoothSerialPort();
var address = '50-dc-e7-a3-0b-e8';
btSerial.findSerialPortChannel(address, function(channel) {
btSerial.connect(address, channel, function() {
console.log('> connected to ' + address);
btSerial.on('data', function(buffer) {
console.log('> receiving ('+buffer.length+' bytes):', buffer);
1. Visit https://awslabs1.awsapps.com/start/
2. Log in with your username and password
3. Your AMB network should already be created with the following settings:
NetworkName acme
NetworkDescription ACME consortium blockchain
Edition STARTER
FirstMemberName ACME1stMember
FirstMemberDescription The first member in the ACME consortium
FirstMemberAdminUsername acme1admin
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* ssid = "..............";
const char* password = "................";
String form = "<form action='led'><input type='radio' name='state' value='1' checked>On<input type='radio' name='state' value='0'>Off<input type='submit' value='Submit'></form>";
String imagepage = "<img src='/led.png'>";