Skip to content

Instantly share code, notes, and snippets.

View Vidimensional's full-sized avatar

Daniel Vidal de la Rubia Vidimensional

  • Barcelona. Spain
View GitHub Profile
@Vidimensional
Vidimensional / CopySQS.py
Created May 18, 2016 12:09
Copy between different SQS queues.
#!/usr/bin/env python
import json
import time
import argparse
import boto.sqs
from termcolor import cprint
@Vidimensional
Vidimensional / debug.log
Created April 13, 2016 14:02
aws_db_security_group makes a modify on every subsequent plan/apply.
2016/04/13 13:54:09 [INFO] Terraform version: 0.6.14 c7e5b24531e73aae1eec2f7530d968ac8c69804c
2016/04/13 13:54:09 [DEBUG] Detected home directory from env var: /home/daniel
2016/04/13 13:54:09 [DEBUG] Discovered plugin: atlas = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-atlas
2016/04/13 13:54:09 [DEBUG] Discovered plugin: aws = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-aws
2016/04/13 13:54:09 [DEBUG] Discovered plugin: azure = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-azure
2016/04/13 13:54:09 [DEBUG] Discovered plugin: azurerm = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-azurerm
2016/04/13 13:54:09 [DEBUG] Discovered plugin: chef = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-chef
2016/04/13 13:54:09 [DEBUG] Discovered plugin: clc = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-clc
2016/04/13 13:54:09 [DEBUG] Discovered plugin: cloudflare = /opt/Hashicorp/Terraform/0.6.14/terraform-provider-cloudflare
2016/04/13 13:54:09 [DEBUG] Discovered plugin: cloudstack = /o
@Vidimensional
Vidimensional / main.tf
Created April 13, 2016 11:50
aws_db_security_group makes a modify on every subsequent plan/apply.
variable "access_key" {
type = "string"
}
variable "secret_key" {
type = "string"
}
@Vidimensional
Vidimensional / terraform_installer.sh
Created April 11, 2016 17:05
Terraform Installer
#!/bin/bash
set -e
INSTALLATION_PATH="/opt/Hashicorp/Terraform"
TERRAFORM_RELEASES_URL="https://releases.hashicorp.com/terraform"
GITHUB_RELEASES_URL="https://api.github.com/repos/hashicorp/terraform/releases"
echo "-> Getting latest release number."
release="$( curl -s ${GITHUB_RELEASES_URL} | jq '.[].tag_name' | head -n1 | grep -Eo '[0-9.]+' )"
@Vidimensional
Vidimensional / example.tf
Created February 24, 2016 16:08
AutoScaling with Terraform (mah o menoh)
variable "access_key" {}
variable "secret_key" {}
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "eu-west-1"
}
@Vidimensional
Vidimensional / https_cert.py
Created January 18, 2016 18:27
Ansible module for self-signed https cert
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os.path
import subprocess
from OpenSSL import crypto, SSL
from ansible.module_utils.basic import *
@Vidimensional
Vidimensional / Dockerfile-lab_pyrrd
Last active November 3, 2015 08:49
python-rrdtoll playground
FROM debian:wheezy
RUN apt-get update
RUN apt-get install --assume-yes vim
RUN apt-get install --assume-yes rrdtool python-rrdtool
@Vidimensional
Vidimensional / Dockerfile
Last active August 29, 2015 14:20
My first Docker thingy
FROM python:2.7-onbuild
CMD [ "python", "./netshare.py" ]