Skip to content

Instantly share code, notes, and snippets.

@burtonr
burtonr / repo-wip-scan.ps1
Last active October 21, 2019 20:18
Work in Progress Directory Scan
<#
.DESCRIPTION
Script to recursively run `git status` on all sub-directories in order to find out
if, or where, you have uncommited files. AKA: Work-in-progress.
The only pre-requisite is that git is installed.
This will work on any operating system with Powershell installed
#>
$ErrorActionPreference = 'SilentlyContinue' # Silence the "not a git repository" errors
@burtonr
burtonr / AKS and OpenFaaS
Last active July 29, 2019 06:00
Commands to use to create an AKS cluster and deploy OpenFaaS to it
# Be sure to log in first!
az login
# Set the default location to avoid having to pass it on each command
az configure --defaults location=southcentralus
# Set the default subscription to avoid having to pass it on each command
az account set -s "Visual Studio Premium with MSDN"
# Create a new resource group (optional)
@burtonr
burtonr / FormResponse.cs
Created February 10, 2019 06:17
OpenFaaS Google Form Response Handler
using Newtonsoft.Json;
namespace Function
{
public class FormResponse
{
[JsonProperty("Email")]
public string Email { get; set; }
[JsonProperty("First Name")]
@burtonr
burtonr / of-kind.sh
Created January 20, 2019 06:57
OpenFaaS on KinD quickstart
#!/bin/bash
echo "> Be KinD with OpenFaaS"
# First, check if docker is available
docker version | 2>/dev/null
if [ $? -ne 0 ]; then
echo "> Docker is required for running OpenFaaS on KinD"
echo "> Install with: 'curl -sLS https://get.docker.com | sudo sh'"
burtonr
[
{
"title": "Private",
"description": "OpenFaaS private function",
"image": "burtonr/pvt-tester",
"name": "pvt-tester",
"network": "func_functions"
}
]
@burtonr
burtonr / dialogflow-sample-request.json
Created January 6, 2018 23:05
This is a sample of the request sent to a webhook when using a Google Assistant device with speech. In this case, it was a Home Mini.
{
"originalRequest": {
"source": "google",
"version": "2",
"data": {
"isInSandbox": true,
"surface": {
"capabilities": [
{
"name": "actions.capability.AUDIO_OUTPUT"