Skip to content

Instantly share code, notes, and snippets.

View fndiaz's full-sized avatar
:octocat:

Fernando fndiaz

:octocat:
  • São Paulo
View GitHub Profile
@fndiaz
fndiaz / s3-to-es-lamba.py
Created August 15, 2018 21:46 — forked from s-fujimoto/s3-to-es-lamba.py
Import Elasticsearch from ELB access log for AWS Lambda Function
##################################################
### Elasticsearch host name
ES_HOST = "search-******************.ap-northeast-1.es.amazonaws.com"
### Elasticsearch prefix for index name
INDEX_PREFIX = "awslogs"
#################################################
### ELB access log format keys
ELB_KEYS = ["timestamp", "elb", "client_ip", "client_port", "backend_ip", "backend_port", "request_processing_time", "backend_processing_time", "response_processing_time", "elb_status_code", "backend_status_code", "received_bytes", "sent_bytes", "request_method", "request_url", "request_version", "user_agent"]
@fndiaz
fndiaz / curl.md
Created July 13, 2018 22:32 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

# -*- coding: utf-8 -*-
#########################################################################
## Database initialization
#########################################################################
from images import THUMB #use PIL to create the photo thumb
from widgets import Radio, Upload, Checkbox
from customvalidators import IS_EMPTY_OR_MASK_OR
auth.settings.hmac_key = G.auth.security_key # before define_tables()
#auth table