This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import psycopg2 | |
import sys | |
import time | |
# Source database & query which monitors job queue | |
connStringSource = "host=<hostname> port=8060 dbname=workgroup user=<tableau or read-only> password=<password>" | |
sqlSource= "SELECT job_name, \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update and install the basics | |
sudo yum update -y | |
sudo yum install epel-release -y | |
sudo yum install haveged -y | |
sudo yum install nano -y | |
# AWS cli - need Python34, PIP | |
sudo yum install python34 -y | |
curl -O https://bootstrap.pypa.io/get-pip.py | |
python3 get-pip.py --user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon | |
stats socket /var/lib/haproxy/stats mode 777 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freegeoip <- function(ip, format = ifelse(length(ip)==1,'list','dataframe')) | |
{ | |
if (1 == length(ip)) | |
{ | |
# a single IP address | |
require(rjson) | |
url <- paste(c("http://freegeoip.net/json/", ip), collapse='') | |
ret <- fromJSON(readLines(url, warn=FALSE)) | |
ret <- data.frame(t(unlist(ret))) | |
latlon <- paste(ret$latitude,ret$longitude,sep=",") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FormData = require('form-data'); | |
var fs = require('fs'); | |
var XMLWriter = require('xml-writer'); | |
... | |
var dsXml = new XMLWriter(); | |
dsXml.startElement('tsRequest') | |
.startElement('datasource') | |
.writeAttribute('name', "file") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<title>I'm an HTML file!</title> | |
<!-- Replace the reference to the JS API on Tableau Public to your server --> | |
<script type="text/javascript" src="http://public.tableausoftware.com/javascripts/api/tableau_v8.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |