This file contains hidden or 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.Data.Entity; | |
using System.Data.Entity.ModelConfiguration; | |
using System.Linq; | |
using NodaTime; | |
using Xunit; | |
namespace EntityFrameworkNodaTimePersistence | |
{ |
This file contains hidden or 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
The web and, in particular, JavaScript are at a stage of explosive innovation which makes it difficult to be certain of choices around libraries and frameworks. What is certain, though, is that choosing the web means a shift in mindset from an eco-system driven largely by a single vendor to one which is chaotic at times and whose strength is measured by capability, compatibility, community and contributions. |
This file contains hidden or 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
# Reads CSV generated by CSVDE and updates the properties for Active Directory User | |
param([Parameter(Position=0, Mandatory=$true)] $FileName) | |
$ReadOnlyProperties = "DN", "objectClass", "sAMAccountName" | |
Write-Host "Reading from $FileName" | |
$UserRecords = Import-Csv $FileName | |
foreach($UserRecord in $UserRecords) { | |
Write-Host "Updating $($UserRecord.DN)" | |
$User = [adsi]$("LDAP://" + $UserRecord.DN) |
This file contains hidden or 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
# Input Properties | |
# ================ | |
# TEAMCITY_BUILDCONF_NAME = Build definition name from CI Server | |
# BUILD_NUMBER = Major.Minor.Revision.Build | |
# Targets | |
# ======= | |
# 1. Clean: Cleans build output folders | |
# 2. Build: Update version tags, compile solution, run static code analysis | |
# 3. Test: Run unit and/or integration tests |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<security> | |
<requestFiltering> | |
<hiddenSegments> | |
<add segment="/bin/" /> | |
<add segment="/conf/" /> | |
<add segment="/data/" /> | |
<add segment="/inc/" /> |
This file contains hidden or 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
$CurrentFolder = $(Get-Location).Path | |
Import-Module SQLPS -DisableNameChecking | |
Set-Location $CurrentFolder |
This file contains hidden or 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
function Set-WebSiteOffline { | |
param( | |
[Parameter(Mandatory=$true)][string]$ServerName, | |
[Parameter(Mandatory=$true)][string]$SiteName, | |
[string]$UserName, | |
[string]$Password | |
) | |
$EncodedSiteName = [System.Web.HttpUtility]::UrlEncode($SiteName); | |
$SiteManagementEndpoint = "https://$ServerName.contoso.com:8172/MSDeploy.axd?Site=$EncodedSiteName"; |
This file contains hidden or 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
// Need to go direct to the registry as the EventLog.CreateEventSource | |
// method cycles through all logs, including the Security log, to | |
// verify that the source does not exist and is unique | |
try | |
{ | |
var logKeyName = String.Format(CultureInfo.InvariantCulture, @"SYSTEM\CurrentControlSet\Services\EventLog\{0}", log); | |
var sourceKeyName = String.Format(CultureInfo.InvariantCulture, @"SYSTEM\CurrentControlSet\Services\EventLog\{0}\{1}", log, source); | |
using (Registry.LocalMachine.OpenSubKey(logKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree) ?? | |
Registry.LocalMachine.CreateSubKey(logKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree)) | |
using (var sourceKey = Registry.LocalMachine.OpenSubKey(sourceKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree) ?? |
This file contains hidden or 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.Linq; | |
using System.Linq.Expressions; | |
using System.Transactions; | |
using FluentAssertions; | |
// ReSharper disable CheckNamespace | |
namespace System.Data.Linq | |
// ReSharper restore CheckNamespace | |
{ |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-16"?> | |
<instrumentationManifest xsi:schemaLocation="http://schemas.microsoft.com/win/2004/08/events eventman.xsd" xmlns="http://schemas.microsoft.com/win/2004/08/events" xmlns:win="http://manifests.microsoft.com/win/2004/08/windows/events" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:trace="http://schemas.microsoft.com/win/2004/08/events/trace"> | |
<instrumentation> | |
<events> | |
<provider name="Company-Product-Module" guid="{11111111-3709-4551-821E-CF1DF1644D14}" symbol="company_product_module"> | |
<events> | |
<event symbol="ApplicationStart" value="1" version="0" channel="Company-Product-Module/Operational" level="win:Informational" task="win:None" opcode="win:Start" message="$(string.Company-Product-Module.event.1.message)" /> | |
<event symbol="ApplicationEnd" value="2" version="0" channel="Company-Product-Module/Operational" level="win:Informational" task="win:None" opcode="win:Stop" message= |