Skip to content

Instantly share code, notes, and snippets.

View davidtucker's full-sized avatar

David Tucker davidtucker

View GitHub Profile
@davidtucker
davidtucker / uuid_v4_excel_formula.txt
Created August 12, 2018 15:58 — forked from msubel/uuid_v4_excel_formula.txt
An Excel Fromula to generate a UUID v4
=LOWER(CONCATENATE(DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;4));4);"-";"4";DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(8;11));DEC2HEX(RANDBETWEEN(0;POWER(16;3));3);"-";DEC2HEX(RANDBETWEEN(0;POWER(16;8));8);DEC2HEX(RANDBETWEEN(0;POWER(16;4));4)))
@davidtucker
davidtucker / AppDelegate.swift
Created May 11, 2017 01:22
Cognito Delegate Implementation in AppDelegate.swift
extension AppDelegate: AWSCognitoIdentityInteractiveAuthenticationDelegate {
func startPasswordAuthentication() -> AWSCognitoIdentityPasswordAuthentication {
if(self.navigationController == nil) {
self.navigationController = self.window?.rootViewController as? UINavigationController
}
if(self.loginViewController == nil) {
self.loginViewController = self.storyboard?.instantiateViewController(withIdentifier: "LoginViewController") as? LoginViewController
}
@davidtucker
davidtucker / AppDelegate.swift
Created May 11, 2017 01:16
Cognito Configuration with the AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// setup logging for AWS & Cognito
AWSDDLog.sharedInstance.logLevel = .verbose
AWSDDLog.add(AWSDDTTYLogger.sharedInstance)
// setup cognito config
self.cognitoConfig = CognitoConfig()
// setup cognito
setupCognitoUserPool()
@davidtucker
davidtucker / example.html
Created November 19, 2013 21:47
Basic NVD3 Pie Chart
<html>
<head>
<link href="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.min.css" rel="stylesheet"></link>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.3.9/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.13-beta/nv.d3.min.js"></script>
</head>
<body>
<div id="pieChart">
<svg></svg>
</div>
@davidtucker
davidtucker / app.js
Created November 15, 2013 11:26
Sample Websockets Chat Server with Socket.IO
// Include Both Express and Socket.io
var express = require('express');
var socketIO = require('socket.io');
// Include the core modules for http and path
var path = require('path');
var http = require('http');
// Setup Express to serve static files from static directory
var app = express();
@davidtucker
davidtucker / install.sh
Created November 15, 2013 01:11
Installing Dependencies with NPM
# Installing Express and Socket.io
npm install express --save-dev
npm install socket.io --save-dev
# Installing Dependencies (for other developers)
npm install
# Updating Dependencies (if new versions were released)
npm update
@davidtucker
davidtucker / package.json
Last active December 28, 2015 08:59
Simple package.json File
{
"name" : "sample-node-application",
"version" : "0.0.1",
"author" : "David Tucker"
}
@davidtucker
davidtucker / example1.js
Last active December 28, 2015 08:09
Node Example 1 - Simple Web Server
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('The Web Server is Running\n');
}).listen(8095);
console.log('Server Running on Port 8095');
---
title: About David Tucker
subtitle: Software developer and architect, author, speaker, and digital strategist
author: David tucker
date: 2013-01-02
template: about.html
keywords: david tucker,developer,architect,author,speaker
changefreq: monthly
priority: 0.7
---
{% extends "layout.html" %}
{% block canonical %}{{ url }}{{ page.url }}{% endblock %}
{% block title %}{{ page.title }}{% endblock %}
{% block meta %}
{{ super() }}
{% if page.metadata.keywords %}<meta name="keywords" content="{{ page.metadata.keywords }}">{% endif %}
{% endblock %}
{% block content %}
<div class="row">
<div class="twelve columns">