December 18th, 2014

Illuminati

Interesting Links for 18-12-2014


Original post on Dreamwidth - there are comment count unavailable comments there.
Illuminati

Parsing IIS logs from PowerShell

Posted because there's no official way of converting IIS W3C logs to PowerShell objects, and the original script I found wasn't quite doing what I wanted.

# Define the location of log files and a temporary file
$LogFolder = "C:\inetpub\logs\LogFiles\W3SVC123"
$LogFiles = ls "$logFolder\u_ex*.log" #Ensure we only get the correctly formatted log files if there's a mixture of styles

# Logs will store each line of the log files in an array
$Logs = @()
# Skip the comment lines
$LogFiles | % { Get-Content $_ | where {$_ -notLike "#[D,F,S,V]*" } | % { $Logs += $_ } }
# Then grab the first header line, and adjust its format for later
$LogColumns = ( $LogFiles | select -first 1 | % { Get-Content $_ | where {$_ -Like "#[F]*" } } ) `
-replace "#Fields: ", "" -replace "-","" -replace "\(","" -replace "\)",""

$newLine = "`r`n"

$tempCsv = "$($LogColumns[0])$newline$($Logs -join $newline)"

return $tempCsv | ConvertFrom-Csv -Delimiter " "



Original post on Dreamwidth - there are comment count unavailable comments there.
slogans

Had my nuts cracked, Чайко́вский style

Nice evening today. I left work at 5:15 and walked across town to Edinburgh's best Indian restaurant, had a delicious meal with Julie, and then went to see The Nutcracker with her.

The design of the sets and costumes was gorgeous, the dancing was great, and the music was...well, presumably you've heard large chunks of The Nutcracker before.

Ballet isn't generally my thing, but it held my attention marvellously for a good hour of the two hour length - and thankfully, that hour was spread out quite a lot. Lots of good moments distributed throughout the whole evening, some lovely little comedic touches from two "monkeys" sitting at the feet of Clara (the young girl whose dream forms the majority of the performance).

It wasn't life-changing, but I am glad I saw it.



Original post on Dreamwidth - there are comment count unavailable comments there.