Skip to content

Instantly share code, notes, and snippets.

@tomodian
tomodian / setup.sh
Last active April 11, 2019 10:32
Setup script for Ubuntu 18.04 on Windows.
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
echo "Installing docker.."
sudo apt-get -y install \
@tomodian
tomodian / Dockerfile
Created March 27, 2017 08:46
Athena on Python Demo
FROM openjdk:8u121-jre
WORKDIR /tmp
RUN echo "Install OS dependencies.." && \
apt-get update && \
apt-get -y install python python-dev python-pip && \
echo "Fixing pip packaging with manual update.." && \
apt-get purge -y python-pip && \
wget https://bootstrap.pypa.io/get-pip.py && \
@tomodian
tomodian / firehose-to-athena.js
Created February 28, 2017 15:22
Firehose to Athena
'use strict';
const aws = require('aws-sdk');
const s3 = new aws.S3({ apiVersion: '2006-03-01' });
exports.handler = (event, context, callback) => {
const key = decodeURIComponent(event.Records[0].s3.object.key);
const meta = key.split('/');