Skip to content

Instantly share code, notes, and snippets.

@laidig
laidig / bootstrap_instance.sh
Last active June 13, 2017 18:46 — forked from philfreo/bootstrap_instance.sh
AWS User script to bootstrap any instance
#!/bin/bash -x
# User script to bootstrap any instance.
# This will set up, array, and format every instance storage
# drive present in the instance (if any)
#
# The disk format/layout is read from an EC2 tag "DiskLayout"
# (defined in the cloudformation templates) and it defaults to
# "raid0". Possible values are:
# * raidN: grabs all available instance storage drives, creates a
@laidig
laidig / upload_to_cartodb.py
Created October 10, 2015 23:05
Batch upload SQL data to CartoDB from Stdin or file via Python
#!/usr/bin/python
# this script iterates over input from standard in (ideally properly formatted PlPgSQL)
# and POSTs it to CartoDB using credentials in credentials.ini
import requests
import fileinput
from itertools import islice
import json
import re