Skip to content

Instantly share code, notes, and snippets.

View antonlindstrom's full-sized avatar
👓

Anton Lindström antonlindstrom

👓
View GitHub Profile
#!/usr/bin/perl
#
# Collecting data from access.log and
# presenting data as top 10 lists.
#
# The lists are; IP adresses, domains,
# files, month, hours and browsers.
#
# When domains does not exists IP is printed.
#
#!/usr/bin/perl
#
# Script to parse mail.log from postfix
# and send information to a .csv file.
# Information is sender, recipient, date,
# size and status of message.
#
# Author: Anton Lindström
# me@antonlindstrom.com
#
#!/usr/bin/perl
#
# Program to parse .csv file from mail.log
# and write out top mailers based on number
# and size of mails.
#
# Author: Anton Lindström
# me@antonlindstrom.com
#
#!/usr/bin/perl
#
# Parsing an IRC logfile and writing it
# to a colored html-file. When generated
# it prints amount of different messages
# exists.
#
# Colorlist exists as plain text at
# http://code.antonlindstrom.com/colorlist
#
#!/usr/bin/perl
#
# Checks auth.log for breakin attempts
#
# Author Anton Lindstrom
# antonlindstrom.com
use warnings;
use strict;
my $logfile = "/var/log/auth.log";
@antonlindstrom
antonlindstrom / make.conf - HP2140
Created March 5, 2010 15:06
make.conf file for HP2140
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -fomit-frame-pointer -pipe -O2"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
USE="acpi intel mmx mmxext smp sse2 ssse3 v4l2 svg"
VIDEO_CARDS="intel vesa vga fbdev"
ALSA_CARDS="hda-intel loopback virmidi"
INPUT_DEVICES="evdev keyboard mouse synaptics"
CONFIG_PROTECT="-*"
@antonlindstrom
antonlindstrom / tcpdump.sh
Created March 7, 2010 19:10
tcpdump helper
#!/bin/bash
IFACE=vr0
LOGNAME=demolog
IPADDR=127.0.0.1
tcpdump -i $IFACE -s 8192 -w $LOGNAME.log host $IPADDR
$rows = $dbh->preExeFetch("
SELECT
kategorier_id, inkomst
FROM
budget_kategorier
ORDER BY
kategorier_id
");
@antonlindstrom
antonlindstrom / gist:709765
Created November 22, 2010 09:59
A few minutes work to check diff in directory (rsync does not exist on remote)
#!/usr/bin/env ruby
require 'find'
require 'digest/md5'
skip = [/.+\.swp$/, /ikihashfile/, /.+\.rb/]
scp_string = "hisiki:~/public_php/"
temp_file = "./ikihashfile"
# Hashes
@antonlindstrom
antonlindstrom / gist:725159
Created December 2, 2010 11:34
DA330G List