Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
## Setup Lockfile
LOCKFILE=/tmp/lock.txt
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then
echo "already running"
exit
fi
## Setup Trap
module "app" {
source = "../../modules/app"
asg_name= "app"
azs = ["${var.azs}"]
subnets = ["${var.subnets}"]
}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x42eaac0]
goroutine 1 [running]:
github.com/hashicorp/terraform/command.(*Meta).backendInitRequired(0xc420587e60, 0xc420b1a4c0, 0x33)
/mnt/jenkinsslave/workspace/terraform/packages/src/github.com/hashicorp/terraform/command/meta_backend.go:1457 +0x1c0
github.com/hashicorp/terraform/command.(*Meta).backendFromConfig(0xc420587e60, 0xc420aab7c8, 0x0, 0x0, 0x0, 0x0)
/mnt/jenkinsslave/workspace/terraform/packages/src/github.com/hashicorp/terraform/command/meta_backend.go:418 +0x1025
github.com/hashicorp/terraform/command.(*Meta).Backend(0xc420587e60, 0xc420aab7c8, 0x5382a00, 0x8196060, 0xc4203ffe40, 0x70)
/mnt/jenkinsslave/workspace/terraform/packages/src/github.com/hashicorp/terraform/command/meta_backend.go:90 +0x857
@adamar
adamar / client.py
Created April 6, 2017 06:37
Simple Websocket Client & Server Example (Python)
import websocket
import thread
import time
import sys
port = sys.argv[1]
def on_message(ws, message):
@adamar
adamar / random-man.sh
Created February 21, 2017 04:51
Open a random Man Page
man -k . | shuf | head -n 1 | cut -d" " -f1 | xargs man
@adamar
adamar / index.php
Last active December 20, 2016 13:06
<?php
header("Content-Type: text/plain");
echo "Hello, world!\n";
#!/usr/bin/env python
__author__ = 'Frank Smit <[email protected]>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback
@adamar
adamar / gist:1f2a0fba61b7976c4044
Created March 10, 2015 21:41
View details of a set of AWS IAM Keys
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# This script takes a set of boto credential stored
# in a profile stanza and returns some account and user details
#
# [profile unknown]
# aws_access_key_id = AKIABLAHBLAH
# aws_secret_access_key = SUCHSECRETUUUUHHHHH
@adamar
adamar / pre-commit
Last active August 29, 2015 14:15 — forked from DmZ/pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
package main
import (
"database/sql"
"fmt"
"time"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)