Skip to content

Instantly share code, notes, and snippets.

View aabouzaid's full-sized avatar
🐧
I build sustainable solutions!

Ahmed AbouZaid aabouzaid

🐧
I build sustainable solutions!
View GitHub Profile
@hoitomt
hoitomt / log_request.go
Created January 30, 2015 12:56
Golang: Log HTTP Requests in Go
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func main() {
#! /bin/python
# 7 minutes Ansible module to list groups in inventory (Python version) :D
# You can print output like "pretty-print" outside Ansible by using:
#./listgroups /path/to/ansible.cfg | python -m json.tool
import sys
import re
import json
#get hosts inventory from ansible.cfg file.
@cespare
cespare / log.go
Created October 31, 2012 06:51
Golang apache logging
type ApacheLogRecord struct {
http.ResponseWriter
ip string
time time.Time
method, uri, protocol string
status int
responseBytes int64
elapsedTime time.Duration
}
@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####