Skip to content

Instantly share code, notes, and snippets.

View caseysoftware's full-sized avatar

Keith Casey caseysoftware

View GitHub Profile
# This is to get my awesome monkey prompt.
umask 002
#PS1='[\h]$ '
export PS1="\w \`if [ \$? = 0 ]; then echo -e '\[\e[01;32m\]\n\xF0\x9F\x90\xB5 '; else echo -e '\[\e[01;31m\]\n\xF0\x9F\x90\xB5 '; fi\` \[\e[01;34m\]\[\e[00m\]"
@caseysoftware
caseysoftware / notification.js
Created February 14, 2023 07:39
/server/routes/notification.js for the Zoom App
import express from 'express'; //DKC
import { handleError, sanitize } from '../helpers/routing.js';
import { contextHeader, getAppContext } from '../helpers/cipher.js';
import session from '../session.js';
const router = express.Router();
/*
* Home Page - Zoom App Launch handler
* this route is used when a user navigates to the deep link
@caseysoftware
caseysoftware / app.js
Created February 14, 2023 07:35
app.js for Zoom App Demo
import express from 'express';
import axios from 'axios';
import compression from 'compression';
import cookieParser from 'cookie-parser';
import debug from 'debug';
import helmet from 'helmet';
import logger from 'morgan';
import { dirname } from 'path';
import { fileURLToPath, URL } from 'url';
@caseysoftware
caseysoftware / index.js
Created September 11, 2019 23:12
Retrieve Weather Data from Open Weather - https://openweathermap.org
exports.handler = function( event, context ) {
var https = require( 'https' );
var url = 'https://api.openweathermap.org/data/2.5/forecast?zip=78745,us&APPID=****APIKEY****'
https.get( url, function( response ) {
var data = '';
@caseysoftware
caseysoftware / search.sh
Created January 15, 2016 06:12
This is searching sample audio for the quickstart on the developer portal page
curl https://api.clarify.io/v1/search?query=dorothy \
--header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / load.sh
Created January 15, 2016 06:11
This is loading sample audio for the quickstart on the developer portal page
curl --data "media_url=http://media.clarify.io/audio/books/dorothyandthewizardinoz_01_baum_64kb.mp3" \
--data "name=Dorothy and the Wizard of Oz" https://api.clarify.io/v1/bundles \
--X POST --header "Authorization: Bearer myapikey"
@caseysoftware
caseysoftware / insights.json
Created January 2, 2016 07:04
This is a sample of a request for available insights. Used in the Medium post.
{
"bundle_id": "abcde12345",
"created": "2015-03-04T05:03:04.292Z",
"updated": "2015-05-16T20:39:37.508Z",
"_class": "Insights",
"_links": {
"curies": [
{
"href": "/docs/insights/{rel}",
"name": "insight",
@caseysoftware
caseysoftware / video.html
Last active January 2, 2016 07:05
This is a sample snippet of how to embed captions within the video.js player. This is used in the closed captioning post.
<video id="clarify_video" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="264"
data-setup='{"example_option":true}'>
<source src="http://example.com/clarify-video.mp4" type='video/mp4' />
<source src="http://example.com/clarify-video.webm" type='video/webm' />
<source src="http://example.com/clarify-video.ogv" type='video/ogg' />
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
</video>
@caseysoftware
caseysoftware / head.html
Last active January 2, 2016 07:06
These are the javascript files to include to use video.js. This is used in the closed captioning post.
<link href="http://vjs.zencdn.net/5.0/video-js.min.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.0/video.min.js"></script>
@caseysoftware
caseysoftware / get-captions.sh
Last active January 2, 2016 07:06
This is how to request an insight (in this case, captions). This is used in the closed captioning post.
curl https://api.clarify.io/v1/bundles/abcde12345/insights/fadbe23456 \
--header "Authorization: Bearer myapikey"