Skip to content

Instantly share code, notes, and snippets.

View jesusvazquez's full-sized avatar
👣
Leaving footprints all over

Jesus Vazquez jesusvazquez

👣
Leaving footprints all over
View GitHub Profile
@jesusvazquez
jesusvazquez / reflect.py
Created July 27, 2017 03:41 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):

Terraform Cheatsheet

Debug stuff

Debug any command             TF_LOG=debug terraform <command>

Plan and Apply single resource

terraform plan -target

Import datadog monitors using terraform

Template: terraform import <datadog-resource-name>.<name-that-we-give-to-the-resource>.<resource-id>

Example for monitors:

terraform import datadog_monitor.sidekiq_queued_jobs_express 2250497

Time to write HCL

@jesusvazquez
jesusvazquez / sqlite3-cheat-sheet.md
Last active June 29, 2017 08:42 — forked from vincent178/sqlite3-cheat-sheet.md
sqlite3 cheat sheet

Vim Cheatsheet

Generally helpful stuff

Open a file for editing             :e path/to/file.txt
Return to Normal mode               ESC   or <CTRL>+C

Navigating around text

@jesusvazquez
jesusvazquez / use_terraform.sh
Last active August 30, 2017 15:46
Switch terraform versions
#!/bin/sh
# Source: https://github.com/jvrplmlmn/osx-config/blob/master/files/zshrc.d/50-terraform-versions.sh
function use_terraform {
TF_BASE=/opt/terraform
if [ -z "$1" ]
then
echo "Usage: use_terraform X.Y.Z"
echo