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
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<h2>ASP.NET Server Variables</h2> | |
<table class="table table-striped table-bordered table-condensed"> | |
<tr> | |
<th>Key</th> | |
<th>Value</th> | |
</tr> | |
@foreach (var key in Request.ServerVariables.AllKeys) |
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
SELECT (SELECT SUBSTRING( | |
(SELECT ('; ' + Username + '') FROM | |
(SELECT AD.sAMAccountName as Username | |
FROM OPENQUERY(ADSI, 'SELECT sAMAccountName, displayName, userPrincipalName, userAccountControl, company | |
FROM ''LDAP://myserver/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=my-domain,DC=co,DC=uk'' | |
WHERE objectClass = ''Person''' | |
) AD | |
WHERE AD.userPrincipalName Is NOT Null | |
AND AD.sAMAccountName Is Not Null | |
AND AD.userAccountControl NOT IN (512, 546, 514, 66050) |
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
SELECT CONVERT(int, objectGUID) AS UserID, LOWER(LEFT(userPrincipalName, LEN(userPrincipalName) - LEN('@my-domain.co.uk'))) AS Username, givenName AS FirstName, sn AS Surname, LOWER(mail) AS Email, | |
CONVERT(nvarchar(20), telephoneNumber) AS DirectDial, CONVERT(nvarchar(20), pager) AS ExtensionNumber, CONVERT(nvarchar(20), mobile) AS MobileNumber, Department, title AS JobTitle, | |
REPLACE(LOWER(givenName) + '-' + LOWER(sn) + '.jpg', ' ', '-') AS ProfileImageCSS, | |
LOWER(userPrincipalName) AS UsernameFull, userAccountControl AS AccountStatus, distinguishedName AS ADTreeRoute | |
FROM OPENQUERY(ADSI, | |
'SELECT objectSID, objectGUID, userPrincipalName, sAMAccountName, givenName, sn, mail, telephoneNumber, pager, mobile, physicalDeliveryOfficeName, Department, title, userAccountControl, distinguishedName | |
FROM ''LDAP://my-server/DC=my-domain,DC=co,DC=uk'' | |
WHERE objectCategory = ''person'' AND objectClass = ''user'' | |
ORDER BY SN ASC') AS ad | |
WHERE RIGHT(distinguishedName, LEN('OU=SBSUsers,OU=Users, |
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 My.OrderPortal.Models; | |
using Merchello.Core.Gateways.Payment; | |
using Merchello.Core.Gateways.Shipping; | |
using Merchello.Core.Models; | |
using Merchello.Web; | |
using Merchello.Web.Mvc; | |
using Constants = Merchello.Providers.Constants; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; |
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
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1 | |
$domain = "mydomain.com" | |
$certificiatePassword = "abcd1234" | |
$email = "letsencrypt@mydomain.com" | |
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid() | |
mkdir $vault | |
cd $vault | |
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/ | |
New-ACMERegistration -Contacts mailto:$email |
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; | |
namespace Xrisdoc.Extensions | |
{ | |
public static class DateTimeExtensions | |
{ | |
/// <summary> | |
/// Identifies whether or not the specified period is a monthly period | |
/// </summary> | |
/// <param name="startDate">The start date of the period</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
Param( | |
# The bak file from which the restore will be performed | |
[Parameter(Mandatory=$True)] | |
[string]$file, | |
# The directory where the databse files (MDF and LDF) will be saved/restored to | |
[Parameter(Mandatory=$True)] | |
[string]$directory, | |
# The name of the database that is being restored |
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
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$directory, | |
[Parameter(Mandatory=$False)] | |
[string]$backupDirectory = "C:\Backups\", | |
[Parameter(Mandatory=$False)] | |
[boolean]$zip = $False, | |
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
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$file, | |
[Parameter(Mandatory=$False)] | |
[string]$fileNameOverride = "", | |
[Parameter(Mandatory=$False)] | |
[boolean]$appendDateTime = $False, | |
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
# Retrieve the current release | |
$releaseUrl = ('{0}{1}/_apis/release/releases/{2}?api-version=5.0' -f $($env:SYSTEM_TEAMFOUNDATIONSERVERURI), $($env:SYSTEM_TEAMPROJECTID), $($env:RELEASE_RELEASEID) ) | |
$release = Invoke-RestMethod -Uri $releaseUrl -Headers @{ | |
Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" | |
} | |
# Set the relevant variables on the release | |
$release.variables."My.Test.Vari".value = "just a test" | |
$release.variables | Add-Member NoteProperty "My.Other.Test" ([PSCustomObject]@{value='test AGAIN'}) | |
$release.variables | Add-Member NoteProperty "Agent.BakFileToRestoreFrom" ([PSCustomObject]@{value='$(Agent.Output.DatabaseBakFileLocation)'}) |
OlderNewer