Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Beatnik (493)

Beatnik
  (email not shown publicly)
http://www.ldl48.org/

A 28 year old belgian who likes Mountain Dew, Girl Scout Cookies, Tim Hortons French Vanilla Flavoured Cappucinno, Belgian beer, Belgian chocolate, Belgian women, Magners Cider, chocolate chipped cookies and Perl. Likes snowboarding, snorkling, sailing and silence. Bach can really cheer him up! He still misses his dog.

Project Daddy of Spine [sf.net], a mod_perl based CMS.

In his superhero time (8.30 AM to 5.30 PM), he works on world peace.

Journal of Beatnik (493)

Tuesday June 17, 2008
12:38 PM

Fscking sweet software: HP WebInspect

Today, I got a demonstration of HP's WebInspect, which is a very nice web application scanner (including a very extensive SQL injection exploit engine). Unfortunatly, with the sweetness comes a price.
Thursday May 01, 2008
01:24 PM

Contributing to the american economy

We dropped down by a small mall a few miles down from the hotel and picked up some stuff. The loot:
  • iLife '08 ($78)
  • Pink 8 gig iPod ($199.99)
  • Wireless Apple keyboard ($79.99)
  • Some CDs ($30)
  • Some DVDs ($20.99)
  • Perfume for the girlfriend ($56,59)
  • Some clothes ($100)

Total amount of euros poured into the American economy: €365. Considering most of these things are either more expense in Belgium or even impossible to find anyway, all in all a very good deal!

I also picked up some cigarettes for my sister-in-law, at bargain prices (REALLY).

It's quite strange to walk around an area that just breathes "Welcome to America" and only minutes after that get confronted with the evergrowing public waste problem in Naples..

Tuesday April 22, 2008
01:37 PM

jQuery tricks: hiding body elements

Someone gestured me towards jQuery recently. I've been playing around with it a bit. Yesterday I got the following idea: allow the visitor to minimize the fancy logos and just show the important stuff. I had the following:

<style type="text/css">
body {
        /* Some other stuff here */
        background-image: url(http://localhost/images/bg.jpg);
        background-repeat: repeat-x;
}
</style>
<body>
<!-- Some other stuff here -->
</body>

The background was the element I wanted to hide. I ended up with something like this:

<style type="text/css">
body {
        /* Some other stuff here */
        background-image: url(http://localhost/images/bg.jpg);
        background-repeat: repeat-x;
}
</style>
<script type="text/javascript" language="javascript" src="jquery.js"></script>
<body>
<!-- Some other stuff here -->
<a id="mini" href="#" OnClick="
if ( $('#mini').text() == '[-]' ) { $('#mini').text('[+]') } else { $('#mini').text('[-]'); }
if ($('body').css('background-image') == 'url(http://localhost/images/bg.jpg)')
   { $('body').css('background-image','url()'); } else
   { $('body').css('background-image','url(http://localhost/images/bg.jpg)'); }
return false;">[-]</a>
<!-- and here -->
</body>

This adds a small [-] link that, when clicked, clears the background and changes to a [+]. Clicking again switches back.

Thursday April 17, 2008
04:28 PM

Italy, here I come

Looks like I'll be spending 2 weeks in Italy pretty soon. I'll be staying about an hour south of Rome, with some co-workers (working, obviously). We'll have the weekend in between off so I might drop by Rome again.
04:12 PM

Lease signed

My girlfriend and me signed the lease contract for our very first duplex together this evening. We'll be moving in on the first of July. For my girlfriend, it'll mean a 1 minute walk to work instead of a 5 minute "taxi boyfriend". For me, the drive to work is about the same. Most importantly, we're finally moving in together.
Monday April 14, 2008
02:17 PM

Being able to read is not a requirement for this job

You know how sometimes with different platforms, they use different filesystems? This rule also exists with backup tapes. A backup tape on Solaris is usually formatted differently than one on Windows. Although the backup tapes and tape drives are clearly marked, one of my well-trained co-workers managed to put 3 out of 4 tapes in the wrong drive, resulting in a very strange error. Someone's in for some Pwnage tomorrow.
Friday April 04, 2008
01:52 PM

Tips for job searching

These almost endless list of things not to do in application letters, job interviews, resumes is both funny and sad but definitely educational.
Saturday March 22, 2008
10:39 AM

The curse of Facebook

Seems like adding their application to Facebook had a bit of an opposite effect.
Tuesday March 18, 2008
03:49 PM

VBA: Generating Word files from Excel data

I had data in an Excel file that I wanted to get into Word in a very nice layout, with some fancy introduction text. I came up with the following VBA code:

Public Sub GenDoc()
Dim WordDocument As Word.Document
Dim TableTemplate As Word.Document
Dim DocumentTemplate As Word.Document
Dim WordApplication As Word.Application
Dim DocumentRange As Word.Range
Dim ExcelWorksheet As Excel.Worksheet

Dim i As Integer
Set WordApplication = CreateObject("Word.Application")

' Template for fancy introduction
' Open as read-only
Set DocumentTemplate = WordApplication.Documents.Open("template1.doc", False, True)

' Template for fancy layout per Excel row
' Open as read-only
Set TableTemplate = WordApplication.Documents.Open("template2.doc", False, True)

WordApplication.Visible = False
Set WordDocument = WordApplication.Documents.Add
Set DocumentRange = WordDocument.Content

' This bit apparently guarantees that pasted blocks are appended, not overwriting the selected block
DocumentRange.Collapse Direction:=wdCollapseEnd
DocumentTemplate.Content.Copy
' Paste the fancy header into the newly created document
DocumentRange.Paste
Set ExcelWorksheet = ThisWorkbook.Worksheets.Item(1)
' Assume 100 columns
For i = 1 To 100
  DocumentRange.Collapse Direction:=wdCollapseEnd
  ' Paste the formatted table stuff
  TableTemplate.Content.Copy
  DocumentRange.Paste

  ' In the fancy template, I had some markers..
  ' Replace counter - NUMBERMARKER
  WordDocument.ActiveWindow.Selection.Find.ClearFormatting
  WordDocument.ActiveWindow.Selection.Find.Replacement.ClearFormatting
  With WordDocument.ActiveWindow.Selection.Find
   .Text = "NUMBERMARKER"
   ' Replace NUMBERMARKER with i
   .Replacement.Text = i
   .Wrap = wdFindStop
   .Format = False
   .MatchWholeWord = True
   .MatchSoundsLike = False
   .MatchAllWordForms = False
  End With
  WordDocument.ActiveWindow.Selection.Find.Execute Replace:=wdReplaceAll
Next i

' Wrap it up
DocumentTemplate.Close
TableTemplate.Close
WordApplication.Visible = True
WordApplication.Activate
End Sub

I also had some fancy progress bar in there somewhere.. I'm getting quite good at this drive-by VBA coding.

Wednesday March 12, 2008
04:00 PM

Cool T's

I somehow found these T-shirt prints. Super!