RSS

Category Archives: Uncategorized

Log Parser Lizard format time for IIS log file


SELECT TOP 100
TO_STRING(TO_TIME(time), 'hh:mm:ss') AS TimeLocal,
sc-status,
* FROM 'D:\temp\w3wp.log'
where
TO_TIMESTAMP(date, time) > TIMESTAMP('2015-10-28 19:59', 'yyyy-MM-dd HH:mm')
and sc-status='500'
and
cs(User-Agent) like 'Mozilla/5.0+(Windows+NT+6.1%;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/46.0.2490.80+Safari/537.36'

if the time is in utc and you want it local first load it into To_TimeStamp then do To_LocalTime

TO_TIMESTAMP(date, time) AS utc-timestamp, TO_LOCALTIME(utc-timestamp) AS local-timestamp

 
Leave a comment

Posted by on October 29, 2015 in Uncategorized

 

Tags:

.Net Fusion Log Viewer

While you can use the registry to turn on or off .Net Fusion/Assembly Binding I find that very painful. Instead I use Fusion Log Viewer. To use it simple type fuslogvw from a Visual Studio command prompt.

 
Leave a comment

Posted by on May 8, 2015 in Uncategorized

 

Tags:

Add untracked files to git recursively

Have you ever needed to add all of the untracked files to git but due to your .gitignore file’s settings your files are not added when you do:

“git add .”

Use this command:

“git ls-files –others .\build\tools | xargs git add -f”

 

 

 
Leave a comment

Posted by on October 4, 2013 in Uncategorized

 

Tags:

MS Sql print/select text column as XML without truncating

CAST(COLUMNNAME as XML)

 
Leave a comment

Posted by on June 6, 2013 in Uncategorized

 

Convert unicode file to ascii file

CHCP 1252
TYPE unicode.txt > ascii.txt

An added benefit of doing this is that the file size will probably be reduced to 1/3 the original size.

Credit to http://www.robvanderwoude.com/type.php#Unicode

 
Leave a comment

Posted by on August 5, 2011 in Uncategorized

 

Tags: , ,

Why am am I blogging?

To be honest it is for selfish reasons. I have found over the years that I will read and search for code that I find interesting and then later, perhaps on another code project, I cannot find that interesting or cool post.

 
Leave a comment

Posted by on March 29, 2011 in Uncategorized