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

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 / sqlite3-cheat-sheet.md
Last active June 29, 2017 08:42 — forked from vincent178/sqlite3-cheat-sheet.md
sqlite3 cheat sheet
@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):
@jesusvazquez
jesusvazquez / nomad_cheatsheet.md
Created July 31, 2017 14:09
Nomad Cheatsheet

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

@jesusvazquez
jesusvazquez / redis.nomad
Created August 22, 2017 14:46
Example redis.nomad template with ephemeral disk and data persistance
job "redis" {
region = "global"
datacenters = ["test"]
type = "service"
constraint {
attribute = "${node.class}"
value = "default"
}
@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
@jesusvazquez
jesusvazquez / ctags.setup
Created September 11, 2017 20:16 — forked from nazgob/ctags.setup
ctags setup on mac
# 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"
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@jesusvazquez
jesusvazquez / keybase.md
Created October 16, 2017 20:04
Keybase

Keybase proof

I hereby claim:

  • I am jesusvazquez on github.
  • I am jesusvazquez (https://keybase.io/jesusvazquez) on keybase.
  • I have a public key ASA9Y_Fqy7kUcb6wiXIeVdL_RAo7p-lgsTM3cGrYwNtKXAo

To claim this, I am signing this object:

Terraform Cheatsheet

Debug stuff

Debug any command             TF_LOG=debug terraform <command>

Plan and Apply single resource

terraform plan -target