Skip to content

Instantly share code, notes, and snippets.

View hreeder's full-sized avatar

Harry Reeder hreeder

View GitHub Profile
;;; emacs --- My Emacs Config
;;; Commentary:
;;; Mostly aquired from https://www.youtube.com/watch?v=0cZ7szFuz18
;;; Code:
(require 'package)
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/"))
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
@hreeder
hreeder / parser.py
Last active February 27, 2024 03:53
Python nginx Log Parser
#!/usr/bin/env python
import gzip
import os
import sys
import re
INPUT_DIR = "nginx-logs"
lineformat = re.compile(r"""(?P<ipaddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?P<dateandtime>\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\] ((\"(GET|POST) )(?P<url>.+)(http\/1\.1")) (?P<statuscode>\d{3}) (?P<bytessent>\d+) (["](?P<refferer>(\-)|(.+))["]) (["](?P<useragent>.+)["])""", re.IGNORECASE)
@hreeder
hreeder / gist:c7618fb1f454a334be72
Created April 15, 2015 13:18
requirements.txt
(logparse)0.07 skull@main
dev/logparse » pip freeze
Jinja2==2.7.3
MarkupSafe==0.23
Pygments==2.0.2
argparse==1.2.1
backports.ssl-match-hostname==3.4.0.2
brewer2mpl==1.4.1
certifi==14.05.14
ggplot==0.6.5
@hreeder
hreeder / channoticetab.pl
Created June 20, 2014 18:09
Channel Notice Tab
# Name: channoticetab-004.pl
# Version: 004
# Author: LifeIsPain < idontlikespam (at) orvp [dot] net >
# Date: 2010-04-21
# Description: Creates a tab for all channel notices with auto reply to notice destination
# Notices will be split up into status notices as well, so receiving a
# /notice @#channel will be in a different tab from /notice #channel and /notice +#channel
# (op notice, all users, and voice and higher respectively). Typing a reply in the query
# box will result in sending a reply notice to the same users.