Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ogrodnek on github.
  • I am ogrodnek (https://keybase.io/ogrodnek) on keybase.
  • I have a public key whose fingerprint is CE6B 1783 3D37 2675 870D C57F 8606 98A6 A6EB 9B50

To claim this, I am signing this object:

@ogrodnek
ogrodnek / packer-permissions.json
Created September 19, 2016 17:25
packer IAM permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "NonResourceBasedReadOnlyPermissions",
"Action": [
"ec2:DescribeSubnets",
"ec2:DescribeSnapshots",
"ec2:DescribeImages",
"ec2:DescribeVolumes",
#!/bin/bash -e
set -x
SBT_HOME=/tmp/sbt
if ! [ -d $SBT_HOME ]; then
mkdir -p $SBT_HOME/bin
curl -L https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.12/sbt-launch.jar -o $SBT_HOME/bin/sbt-launch.jar
#!/usr/bin/python
"""
Script to migrate marathon tasks from the host going for maintenance
optional arguments:
-h, --help show this help message and exit
--url URL Marathon URL (http://marathon.example.com)
--hosts HOSTS Hosts going to go for maintenance
@ogrodnek
ogrodnek / gist:2933779
Created June 15, 2012 00:13
AWS Billing hive schema
create external table aws_billing(
InvoiceId string,
PayerAccountId string,
LinkedAccountId string,
RecordType string,
RecordID int,
BillingPeriodStartDate string,
BillingPeriodEndDate string,
InvoiceDate string,
PayerAccountName string,
@ogrodnek
ogrodnek / gist:2933771
Created June 15, 2012 00:11
move AWS billing data to hive partitioned paths
package com.bizo.aws.billing
import com.amazonaws.services.s3._
import com.bizo.util.aws.SystemPropertyOrEnvAWSCredentials
import com.amazonaws.services.s3.model.ListObjectsRequest
import scala.collection.JavaConversions._
object BillingMover {
val bucket = ...
def main(args: Array[String]) {
@ogrodnek
ogrodnek / TempDisplay.ino
Created January 30, 2012 03:06
Arduino ambient temperature display
/**
* Simple Ambient temperature display.
*
* Will display the temperature in both Fahrenheit and Celsius and
* adjust the backlight color depending on the temperature.
*
* If the temperature range is between 61F and 67F, the display will be
* green. Above and it will be red, below is blue.
*
* More information is available here:
@ogrodnek
ogrodnek / set-hadoop-heap.sh
Created January 27, 2011 00:37
EMR bootstrap script to set the hadoop head size
#!/bin/bash
if [ $# -lt 1 ]; then
SIZE="2048"
else
SIZE=$1
fi
echo "HADOOP_HEAPSIZE=${SIZE}" >> /home/hadoop/conf/hadoop-user-env.sh