Skip to content

Instantly share code, notes, and snippets.


Kevin Hoyt krhoyt

View GitHub Profile
krhoyt / transcribe.env
Created Nov 15, 2022
AWS Transcribe with Python
View transcribe.env
krhoyt /
Created Jan 28, 2022
WebAssembly (C++) in a Web Worker
#include <iostream>
#include <string>
#include "dog.h"
#include "emscripten/bind.h"
using namespace emscripten;
using namespace std;
Dog::Dog( string n ): name( n ) {}
krhoyt / countdown.js
Last active Nov 14, 2020
Countdown clock component based on work of Chris Bongers.
View countdown.js
export default class CountdownClock extends HTMLElement {
constructor() {
const template = document.createElement( 'template' );
template.innerHTML = /* template */ `
:host {
align-items: center;
display: flex;

Advocacy Mission: What Is It? What Is It Not?

Executive Summary

You sell products to developers. By now, you should be acutely aware of the fact that those very developers are increasingly, if not directly, influencing decisions related to purchasing of software technology, such as cloud platforms, frameworks, and tools. Engaging with developers, and the developer community, is not a nice to have, it is a necessity for survival. Per RedMonk cofounder Stephen O'Grady, author of “The New Kingmakers”, developers are the most important, most valuable, constituency in business today, regardless of industry. Technologists are no longer content to be mere stage players. They are taking an active hand at direction.

With developers’ increased power over what technologies a company will be deploying, your business needs to position itself as a respected and trusted adviser to these developers.

Microsoft, Oracle, and SAP among others have been wrestling with these types of issues for years. Microsoft has

krhoyt / async.js
Created Apr 6, 2019
IBM Cloud Function to handle Watson classification of image files placed into Cloud Object Storage.
View async.js
async function main( params ) {
if( params.status === 'added' ) {
const authorization = await rp( {
url: '',
method: 'POST',
form: {
apikey: params.COS_API_KEY,
response_type: 'cloud_iam',
grant_type: 'urn:ibm:params:oauth:grant-type:apikey'
krhoyt / configuration.js
Last active Nov 29, 2019
Get complete list of repos and their respective details for a given GitHub user. Sorted by last updated, ascending. Output to CSV file.
View configuration.js
// Holds pertinent authentiation
module.exports = {
github: {
token: '__your__token__here__'
krhoyt / browser.js
Created Oct 22, 2018
Upload audio file from web to Watson via Cloud Function.
View browser.js
class Captions {
// Constructor
constructor() {
// Holds audio dialog
this.conversation = [];
// Watson logo
// Used as proxy for file selector
// Allowing for customization of interaction
let watson = document.querySelector( 'button.file' );
krhoyt / index.html
Last active Jan 19, 2021
Canvas ImageData to Web Worker
View index.html
<title>Image Processing Worker</title>
body {
align-items: center;
display: flex;
flex-direction: column;
krhoyt / kindle.js
Last active Jul 20, 2018
Parse Kindle Notes (July 2018)
View kindle.js
// Phase 1 - Create additional elements
let dummy = document.createElement( 'textarea' );
document.body.appendChild( dummy );
// Phase 2 - Parse, format, and place on clipboard
// Repeat as needed for each selected book
let notes = document.querySelectorAll( 'span[id=\'highlight\']' );
let pages = document.querySelectorAll( 'span[id=\'annotationHighlightHeader\']' );
let output = '';
krhoyt / decision.js
Created Jul 17, 2018
Interesting alternative decision structure using ES6.
View decision.js
let foo = ( {
a: () => { return 'a'; },
b: () => { return myFunction; }
} )[bar] || 3;