Skip to content

Instantly share code, notes, and snippets.

@lgaa
lgaa / mysql-innodb-bulk-inserts.sql
Created August 23, 2017 15:09 — forked from kbsali/mysql-innodb-bulk-inserts.sql
Mysql InnoDB + MyIsam bulk insert statements
LOCK TABLES `table_name` WRITE;
SET autocommit=0;
SET foreign_key_checks=0;
SET unique_checks=0;
/*....
INSERT ... ON DUPLICATE KEY UPDATE
INSERT IGNORE INTO
....*/
@lgaa
lgaa / README.markdown
Last active July 6, 2016 15:08 — forked from karmi/.gitignore
Example Nginx configurations for Elasticsearch

Example Nginx Configurations for Elasticsearch

This repository contains couple of example configurations for using Nginx as a proxy for Elasticsearch.

These examples can be run standalone from this repository -- the general pattern is:

$ nginx -p $PWD/nginx/ -c $PWD/<CONFIG FILE>

When you change the configuration, simply reload the Nginx process to pick up the changes:

@lgaa
lgaa / check_vpn_status.py
Created June 15, 2016 10:41 — forked from mjbommar/check_vpn_status.py
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region.
'''
@author Bommarito Consulting, LLC; http://bommaritollc.com/
@date 20131029
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region.
'''
# Imports
import boto
import boto.ec2
import boto.vpc
@lgaa
lgaa / FlowLogs-to-S3-Lambda.py
Created March 15, 2016 09:28 — forked from mlapida/FlowLogs-to-S3-Lambda.py
A Lambda Function for streaming and translating flow logs on the fly. This example was used for HP ArcSight. A full writeup can be found on my site http://mlapida.com/thoughts/exporting-cloudwatch-logs-to-s3-lambda
import boto3
import logging
import json
import gzip
import urllib
import time
from StringIO import StringIO
logger = logging.getLogger()
logger.setLevel(logging.INFO)