Skip to content

Instantly share code, notes, and snippets.

View kurtsiegfried's full-sized avatar

Kurt Siegfried kurtsiegfried

View GitHub Profile
@kurtsiegfried
kurtsiegfried / auth_fail.rb
Created May 30, 2012 21:26
Auth log parsing for failed ssh attempts
#!/usr/bin/env ruby
#This script requres a MaxMind GeoIP database.
#I tested with the database from: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
require 'geoip'
require 'json'
#Format
# 0 => Month 1 => Day 2 => Time 3 => host 4=> proc 7=> username 9 => IP
USER_COL = 7
IP_COL = 9
@kurtsiegfried
kurtsiegfried / visitors.rb
Created May 17, 2012 15:57
A quick script to parse a rails log and do some geolocation work. Tested against a Rails 3.2.3 development.log file.
#!/usr/bin/env ruby
#This script requires a MaxMind GeoIP database.
#I tested with the database from: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
require 'geoip'
require 'json'
geo = GeoIP.new('GeoLiteCity.dat')
ips = Hash.new()
visitors = Array.new()
ARGF.each do |line|

##Week Nine Contract

###Deployment

For week nine, I will update the hosting site with the latest code/DB changes. Mo will be performing some intermediate updates to production as well. Production updates will happen on the following days:

  • 7 May 10:30 PM
  • 9 May 10:30 PM
  • 14 May 10:30 PM
  • 16 May 10:30 PM
  • 21 May 10:30 PM
@kurtsiegfried
kurtsiegfried / layout.html
Created April 13, 2012 01:07
SVDP Layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>St Vincent de Paul</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@kurtsiegfried
kurtsiegfried / gist:1796779
Created February 11, 2012 05:47
Embedly Problem 1
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package embedly;
import java.math.BigInteger;
/**
*
@kurtsiegfried
kurtsiegfried / Best Spam Ever
Created April 23, 2011 15:32
My favorite part is signing it: CIA AGENT
Received: from User (unknown [41.118.30.191])
by mail.unu.edu.pe (Postfix) with ESMTP id 1E445768EE6;
Thu, 21 Apr 2011 09:49:59 -0500 (PET)
Reply-To: < imfinternational@micro.lt>
From: "HOMELAND SECURITY SERVICES"<imfdepartment@att.net>
Subject: Re: Urgent reply!!!!
Date: Thu, 21 Apr 2011 16:51:19 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="Windows-1251"