This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'find' | |
require 'digest/md5' | |
skip = [/.+\.swp$/, /ikihashfile/, /.+\.rb/] | |
scp_string = "hisiki:~/public_php/" | |
temp_file = "./ikihashfile" | |
# Hashes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rows = $dbh->preExeFetch(" | |
SELECT | |
kategorier_id, inkomst | |
FROM | |
budget_kategorier | |
ORDER BY | |
kategorier_id | |
"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFACE=vr0 | |
LOGNAME=demolog | |
IPADDR=127.0.0.1 | |
tcpdump -i $IFACE -s 8192 -w $LOGNAME.log host $IPADDR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="-*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Checks auth.log for breakin attempts | |
# | |
# Author Anton Lindstrom | |
# antonlindstrom.com | |
use warnings; | |
use strict; | |
my $logfile = "/var/log/auth.log"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# [email protected] | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# [email protected] | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Script to catch authentication failures in auth.log. | |
# Catching three different error types. | |
# | |
# Author Anton Lindstrom | |
# [email protected] | |
use warnings; | |
use strict; |