Skip to content

Instantly share code, notes, and snippets.

Wayne Folkes meetupwayne

  • Meetup
Block or report user

Report or block meetupwayne

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
meetupwayne / es-splunk.js
Created Apr 20, 2017
Sends logs to Elasticsearch and Splunk
View es-splunk.js
// v1.1.2
var https = require('https');
var zlib = require('zlib');
var crypto = require('crypto');
var endpoint = process.env.Custom;
const loggerConfig = {
url: process.env.SPLUNK_HEC_URL || 'https://<HOST>:<PORT>/services/collector',
token: process.env.SPLUNK_HEC_TOKEN || '<TOKEN>',
import boto3
import json
import urllib, urllib2
import os
from datetime import datetime
from dateutil import tz
import time
ecs = boto3.client('ecs')
sns = boto3.client('sns')
View gist:3ec2d062fed24ae2896665efe9dd83d9
fname = raw_input("Enter file name: ")
if len(fname) < 1 : fname = "mbox-short.txt"
fh = open(fname)
count = 0
for line in fh:
if line.startswith('From') and not line.startswith('From:'):
print line.split()[1]
count+= 1
View gist:4f1d5a6298224761367955e486db0e09
print ("Enter file name: ")
fname = gets.strip()
fname = "mbox-short.txt" if (fname.length < 1)
fh = open(fname)
count = 0
fh.readlines.each do |line|
if line.start_with?('From') and not line.start_with?('From:') then
puts line.split()[1]
You can’t perform that action at this time.