Skip to content

Instantly share code, notes, and snippets.

Leaving footprints all over

Jesus Vazquez jesusvazquez

Leaving footprints all over
View GitHub Profile
jesusvazquez /
Last active Aug 30, 2017
Switch terraform versions
# Source:
function use_terraform {
if [ -z "$1" ]
echo "Usage: use_terraform X.Y.Z"
View vim

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


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

View Terraform

Terraform Cheatsheet

Debug stuff

Debug any command             TF_LOG=debug terraform <command>

Plan and Apply single resource

terraform plan -target

jesusvazquez /
Created Jul 27, 2017 — forked from huyng/
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):

nomad inspect enterprise nomad logs nomad logs -f -job enterprise enterprise nomad status enterprise

jesusvazquez /
Last active Sep 14, 2018
Bash Useful Commands

Linux Stuff

for i in ls ; do stat $i ; done

iotop - Read Write speeds iftop - Network current speeds


Test write speed

jesusvazquez / redis.nomad
Created Aug 22, 2017
Example redis.nomad template with ephemeral disk and data persistance
View redis.nomad
job "redis" {
region = "global"
datacenters = ["test"]
type = "service"
constraint {
attribute = "${node.class}"
value = "default"
jesusvazquez / ctags.setup
Created Sep 11, 2017 — forked from nazgob/ctags.setup
ctags setup on mac
View ctags.setup
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"