Skip to content

Instantly share code, notes, and snippets.

View barryz's full-sized avatar
💰
Focusing

penaldo barryz

💰
Focusing
View GitHub Profile
@barryz
barryz / centered.md
Created December 24, 2019 01:53 — forked from ProjectCleverWeb/centered.md
Example of how to do centered text and images in Githb Flavored Markdown
@barryz
barryz / log.go
Created December 15, 2017 11:09 — forked from Tantas/log.go
Apache access logs for golang.
import (
"fmt"
"io"
"net/http"
"strings"
"time"
)
// https://httpd.apache.org/docs/2.2/logs.html#combined + execution time.
const apacheFormatPattern = "%s - - [%s] \"%s %s %s\" %d %d \"%s\" \"%s\" %.4f\n"
@barryz
barryz / client.py
Created July 11, 2016 12:30 — forked from mattbennett/client.py
Greenthread worker
import eventlet
eventlet.monkey_patch()
from eventlet.greenpool import GreenPile
from kombu.pools import producers
from kombu import Exchange, Queue
exchange = Exchange('exchange', type='direct')
queue = Queue('queue', exchange, routing_key='queue')