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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Web; | |
using Sitecore; | |
using Sitecore.Configuration; | |
using Sitecore.Diagnostics; | |
using Sitecore.Layouts; | |
using Sitecore.Pipelines.HttpRequest; |
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
<!-- | |
*********************************************************************************************** | |
Embed in csproj with import and the build events are hooked up automatically | |
<Import Project="..\..\..\Common.targets" Condition="Exists('..\..\..\Common.targets')" /> | |
PreBuild - Handling revision on build so the source control revision number of the project folder is embeded in the last numeric of the projects AssemblyInfoVersion and AssemblyInfoFileVersion | |
PostBuild - Sets revision to 0 and reverts the file with a copy upon finishing for not introducing change on version control for the assemblyInfo.cs | |
In debug mode the revision detection is disabled, and notification is shown instead. | |
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
/// <summary> | |
/// Handle Database operations | |
/// </summary> | |
/// <remarks>The default network packet size is 4,096 bytes. More information at http://technet.microsoft.com/en-us/library/ms177437.aspx </remarks> | |
public class BatchCommands | |
{ | |
private StringBuilder _query = new StringBuilder(); | |
private int _bufferLength = 0; | |
public static string ConnectionString | |
{ |
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
[TestMethod] | |
public void Study_DatetimeOffsets_in_DayViewModel() | |
{ | |
// http://www.asp.net/web-api/overview/testing-and-debugging/unit-testing-controllers-in-web-api | |
// The controller is returning IHttpActionResult, so look at the sample in the bottom of the ms article. | |
// Using OkNegotiatedContentResult safecast resulted in a null in my case. | |
var controller = new DayController(); | |
controller.Request = new HttpRequestMessage(); | |
controller.Configuration = new HttpConfiguration(); |
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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Web; | |
/// <summary> | |
/// Respect the DefaultDocuments even when Umbraco takes over the HttpModule pipeline | |
/// Add file to App_Code (or compile with your project) and | |
/// Add to web.config on system.web > httpModules add name="MyDefaultDocumentsHttpModule" type="DefaultDocumentsHttpModule" |
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
// Try to match the local date format of the browser | |
var userLanguages = LanguageItem.GetRequestUserLanguages(); | |
// Ignore if no language preferences | |
if (userLanguages != null) | |
{ | |
var culture = CultureInfo.CreateSpecificCulture(userLanguages.First().IsoCode); | |
return Updated.ToString("d", culture); | |
} | |
return Updated.ToString("dd.MM.yyyy"); |
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
namespace FemtenNulOtte.NAnt.WebService | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
using System.Web; | |
using System.Web.Services; | |
using System.Xml.Serialization; |
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
namespace FemtenNulOtte.Client.Logic.Utilities | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Mail; | |
using System.Net.Mime; | |
using System.Security.Cryptography.Pkcs; | |
using System.Security.Cryptography.X509Certificates; |
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.IO; | |
namespace ConsoleApplication4_steamapi | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Security.Policy; | |
using System.Text; |
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
"C:\Program Files (x86)\WinSCP\winscp" /console /script="FTPLocalSync.winscp" |
NewerOlder