Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy March andymarch

View GitHub Profile
@andymarch
andymarch / GooglePhotoTakeout
Created Jan 3, 2015
Copy the contents of a Google Takeout for photos to create a local copy
View GooglePhotoTakeout
Function CopyGooglePhotoTakeout
{
Param(
[Parameter(Mandatory=$true)]
[string]$sourcePath,
[Parameter(Mandatory=$true)]
[string]$destinationPath,
[Parameter(Mandatory=$true)]
[bool]$skipEdits
)
@andymarch
andymarch / keybase.md
Created Jul 21, 2015
Account verification on Keybase
View keybase.md

Keybase proof

I hereby claim:

  • I am andymarch on github.
  • I am andymarch (https://keybase.io/andymarch) on keybase.
  • I have a public key whose fingerprint is 30C1 52DB 68DD AF98 F2CF C774 D17A EBD2 5637 266D

To claim this, I am signing this object:

View Auto enroll email MFA on registration
var email = ""
config['registration'] = {
preSubmit: function (postData, onSuccess, onFailure) {
email = postData.email
onSuccess(postData);
},
postSubmit: async function (response, onSuccess, onFailure) {
// WARNING DEMO ONLY, NOT PRODUCTION
//these two calls should be moved to a backend-for-frontend where they can be called properly
// DO NOT PUT TOKENS IN YOUR FRONTEND CODE
@andymarch
andymarch / index.js
Last active Mar 26, 2020
Okta Hapi Bell implementation with Okta.
View index.js
// Load modules
require('dotenv').config()
const bell = require('@hapi/bell')
const hapi = require('@hapi/hapi')
const authCookie = require('@hapi/cookie')
const config = {
cookiePwd: 'cookiecookiecookiecookiecookiecookiecookiecookiecookie',
okta: {
domain: process.env.DOMAIN,
@andymarch
andymarch / app.go
Created Apr 3, 2020
Create Okta App in Go
View app.go
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
View resume.json
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Andy March",
"label": "",
"image": "http://gravatar.com/avatar/d7c78f8757327b65a637aece98939f01",
"summary": "Senior software engineer with over ten years experiance working with pre sales and product teams to prototype, architect and deliver secure intuitive software across a variety of platforms.",
"website": "https://andymarch.co.uk",