Skip to content

Instantly share code, notes, and snippets.

@mick-shaw
mick-shaw / DeleteTranscriptionJobs.sh
Last active November 2, 2020 01:58
Delete AWS Transcription jobs
#!/bin/sh
for jobName in $(aws transcribe list-transcription-jobs --query '[TranscriptionJobSummaries[*].TranscriptionJobName]' --output text --profile oagcssd);
do aws transcribe delete-transcription-job --transcription-job-name $jobName --profile <NamedProfile>;
echo "$jobName is now deleted";
done
"""
You must have an AWS account to use the Amazon Connect CTI Adapter.
Downloading and/or using the Amazon Connect CTI Adapter is subject to the terms of the AWS Customer Agreement,
AWS Service Terms, and AWS Privacy Notice.
© 2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.
NOTE: Other license terms may apply to certain, identified software components
contained within or distributed with the Amazon Connect CTI Adapter if such terms are
included in the LibPhoneNumber-js and Salesforce Open CTI. For such identified components,
// recordchecker.js
//
// Created by: Mick Shaw
// Contact Information: mshaw@potomacintegration.com
// Subject: recordchecker.js
//
// This recordchecker script is invoked from Connect
// when there are multiple phone numbers found and need to match the birthdate.
//
// This script expects a call attribute called 'recordchecker'
// Birthdateconversion.js
//
// Created by: Mick Shaw
// Contact Information: mshaw@potomacintegration.com
// Subject: Birthdateconversion.js
//
// This birthday converstion script is invoked from Connect
// when a caller enters their birthdate.
//
// This script expects a call attribute called 'DOB'
// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
// Quick CLI method for deleting a DynamoDB Item
// CLI Command: node ./deleteit.js <item value?
//
// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
/**
* File: CSVtoDynamoDB.js
* Created: 04/28/2020
* Author: Mick Shaw
* Email: voice.eng@dc.gov
*
* DFHV RecordLocator.csv DynamoDB Upload
*
* This isn't pretty but it worked.
*
#! /usr/bin/perl
##########################################################
# SFTP Script - Backup Files
#
# Author: Mick Shaw
# Company: Potomac Integration and Consulting
# Date: 05/09/2019
#
#
@mick-shaw
mick-shaw / modify Timestamp
Created December 1, 2015 01:07
Modify file timestamp
touch -t 200805101024 filename
#!/bin/bash
# This backup script will delete files in a directory defined as $bkupdir.
# It will only delete files if there is a minimum number off files defined as $filecounter
# If there are at least the minimum number of files in the defined backup directory,
# it will check the age of files defined as $daycounter. Any files with a timestamp
# that is X days old will be deleted.
# Set the minimum number of backups that should remain
filecounter=10
#!/bin/bash
# set recipient Address
ADMIN="recipient@mail.com"
# set alert-level to 90%
ALERT=10
df -P | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $6 }' | while read output;
do