Skip to content

Instantly share code, notes, and snippets.

Avatar

David Soff Davidsoff

View GitHub Profile
@Davidsoff
Davidsoff / cloud_front.rb
Created Apr 24, 2018
cloud_frond request log analyser for IP frequency
View cloud_front.rb
class CloudFront < RequestLogAnalyzer::FileFormat::Base
extend RequestLogAnalyzer::FileFormat::CommonRegularExpressions
line_definition :access do |line|
line.header = true
line.footer = true
line.regexp = /^(#{timestamp('%Y-%m-%d %H:%M:%S')})\s(\w+)\s(\d+)\s(#{ip_address})\s(\w+)\s(\S+)\s(\S+)\s(\d+)\s(\S+)\s(\S+)\s(\S+)\s(\S+)\s(\w+)\s(\S+)\s(\S+)\s(\w+)\s(\d+)\s(\S+)\s(#{ip_address}|-)\s+(\S+)\s(\S+)\s(\w+)\s(\S+)/
line.capture(:timestamp).as(:timestamp)
View wampInit.js
var autobahn = require("autobahn");
module.exports = new autobahn.Connection({
url: "ws://188.226.208.149:3000/",
realm: "realm"
});