This file contains 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
<configSections> | |
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | |
</configSections> | |
<log4net> | |
<appender name="OutputDebug" type="log4net.Appender.OutputDebugStringAppender, log4net"> | |
<layout type="log4net.Layout.PatternLayout,log4net"> | |
<conversionPattern value="%d [%t] %-5p %c - %m%n"/> | |
</layout> | |
</appender> |
This file contains 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
HttpContext.Current.Trace.Write("DEBUG @ " + DateTime.Now.ToString("hh'h' mm'm' ss's' ff'ms'")); |
This file contains 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
DELETE FROM [ELMAH_Error] | |
WHERE TimeUtc < DATEADD(d, -90, getdate()) |
This file contains 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
<configSections> | |
<sectionGroup name="elmah"> | |
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/> | |
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> | |
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> | |
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/> | |
<section name="errorTweet" requirePermission="false" type="Elmah.ErrorTweetSectionHandler, Elmah"/> | |
</sectionGroup> | |
</configSections> |
This file contains 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
TRUNCATE TABLE [umbracoLog] |
This file contains 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
NBTSTAT -A 10.10.10.10 |
This file contains 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
public static T GetAppSetting<T>(string key, T defaultValue) | |
{ | |
var reader = new AppSettingsReader(); | |
try | |
{ | |
return (T)reader.GetValue(key, typeof(T)); | |
} | |
catch (InvalidOperationException) | |
{ |
This file contains 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
using System; | |
using System.Text; | |
public static class ExtensionMethods | |
{ | |
/// <summary> | |
/// Case insensitive string replacement | |
/// </summary> | |
/// <param name="str">string to process</param> | |
/// <param name="oldValue">old value to find</param> |
This file contains 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
string s = string.Join(",", myDict.Select(x => x.Key + "=" + x.Value).ToArray()); |
This file contains 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
/****** Script for SelectTopNRows command from SSMS ******/ | |
SELECT * | |
FROM [dbo].[cmsMacro] | |
WHERE macroRefreshRate > 0 |
OlderNewer