Skip to content

Instantly share code, notes, and snippets.

View cmtoomey's full-sized avatar

Chris Toomey cmtoomey

View GitHub Profile
### Keybase proof
I hereby claim:
* I am cmtoomey on github.
* I am cmtoomey (https://keybase.io/cmtoomey) on keybase.
* I have a public key ASDcak1CYhrKolsclAaRo5myRYFwuWpUx74snmgd9iPwWwo
To claim this, I am signing this object:
@cmtoomey
cmtoomey / VersionAPI.json
Created October 18, 2016 14:34
API Gateway Description
{
"swagger": "2.0",
"info": {
"version": "2016-10-17T16:42:56Z",
"title": "ServerVersions"
},
"host": "4xppv7irje.execute-api.us-west-2.amazonaws.com",
"basePath": "/prod",
"schemes": [
"https"
@cmtoomey
cmtoomey / LambdaToDynamo.js
Created October 18, 2016 14:31
Lambda Function to populate DynamoDB tables
'use strict';
console.log('Loading function');
const aws = require('aws-sdk');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
const dynamodb = new aws.DynamoDB('2012-08-10');
@cmtoomey
cmtoomey / backup.py
Last active August 19, 2016 15:02
Tableau Backup to S3
#This was written Python 2.7, not tested for Python 3
#The original version of this script lived in the Tableau Server directory
#That's why newpath adds on 9.1\bin (the second \ is so Python reads it as a slash and not a character escape
#If you have tabadmin on your path, you can comment out lines 13 & 15
#tinys3 is an easy way to handle S3 activity - https://github.com/smore-inc/tinys3
import tinys3
#os give you access to operating system interfaces
import os
#glob finds patterns
import glob
@cmtoomey
cmtoomey / temp_validate_opts.yml
Created April 12, 2016 22:33
Tableau Validation
---
worker0.gateway.port: 80
worker0.cacheserver.procs: 1
install.firewall.gatewayhole: true
service.runas.username: WIN-56CEIQFDEQOY\TestAccount
worker0.dataserver.procs: 1
jdbc.password: 961a8015afc0d7c826cf33dc9f512f61ef69111f
wgserver.domain.fqdn: ""
wgserver.domain.nickname: WIN-56CEIQFDEQO
service.runas.password: "password"
@cmtoomey
cmtoomey / HTTP request
Last active April 6, 2016 14:11
Mapbox PATCH
PATCH /styles/v1/cmtoomey/cikzyao29004davm1r7aull0w?access_token=[token] HTTP/1.1
Host: api.mapbox.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: fc3820e4-18bb-5e99-597c-27e9eb3549b5
{
"version": 8,
"name": "Basic",
"metadata": {
@cmtoomey
cmtoomey / Animate.js
Created March 28, 2016 20:05
Tableau Animation
i = 1
function interval() {
var i = 0;
setInterval(function() {
if (i < 70) {
console.log("The count is: " + i);
animate1(i);
i++;
}
@cmtoomey
cmtoomey / Syria.html
Last active March 28, 2016 19:37
YouTube + Tableau
<!doctype html>
<html>
<head>
<title>Syria Time with Video</title>
<script src="https://public.tableau.com/javascripts/api/tableau-2.0.0.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<style>
body {
background-color: white;
@cmtoomey
cmtoomey / Country.xml
Created January 25, 2016 19:25
Tableau Data Connection to Firebird for Country-level data
<?xml version='1.0' encoding='utf-8' ?>
<datasource formatted-name='Country' inline='true' version='9.2' xmlns:user='http://www.tableausoftware.com/xml/user'>
<connection class='firebird' dbname='GEOCODING.FDB' local-data='standard' username='sysdba'>
<relation join='inner' type='join'>
<clause type='join'>
<expression op='AND'>
<expression op='='>
<expression op='[Country].[ID]' />
<expression op='[LocalData].[ParentID]' />