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 AutoFixture; | |
| using AutoFixture.Kernel; | |
| using AutoFixture.Xunit2; | |
| using NSubstitute; | |
| using Sitecore.Data; | |
| using Sitecore.Data.Items; | |
| using Xunit; | |
| namespace SitecoreUnitTestingSamples | |
| { |
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
| // Important: Get consent from user first before identifying. Make sure all applicable rules and regulations are followed correctly. | |
| var service = new TrackingService(); | |
| service.IdentifyAs("e-mail", "[email protected]"); | |
| service.SetContactName("John", "Doe"); | |
| service.SetContactEmail("[email protected]"); |
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> | |
| <startup> | |
| <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> | |
| </startup> | |
| <connectionStrings> | |
| <add name="core" connectionString="yourconnectionstring" providerName="System.Data.SqlClient"/> | |
| </connectionStrings> | |
| <system.web> | |
| <membership defaultProvider="sql" hashAlgorithmType="SHA512"> |
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
| /* | |
| * script to export data of the named sheet as an individual csv files | |
| * sheet downloaded to Google Drive and then downloaded as a CSV file | |
| * file named according to the name of the sheet | |
| * original author: Michael Derazon (https://gist.github.com/mderazon/9655893) | |
| */ | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}]; |
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
| #!/bin/bash | |
| #------------------ | |
| # Extract the key, certficiate, and chain in PEM format from a PFX format file | |
| # | |
| # Must supply the input pfx file | |
| PFX_PATH="$1" | |
| if [ "${PFX_PATH}" == "" ]; then | |
| echo "Must supply pfx file path" | |
| exit 1 |
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
| $VerbosePreference = "Continue" | |
| $newUsersFile = Receive-File -Path "C:\temp\upload" -CancelButtonName "No, I will do it using MS Excel instead" | |
| $newUsers = Import-Csv -Path $newUsersFile | |
| foreach($user in $newUsers) { | |
| Write-Verbose "Creating User: $($user.Username)" | |
| New-User -Identity $($user.Username) -Enabled -Password $($user.Password) -Email $($user.Email) -FullName "$($user.Name)" | |
| $($user.Roles).Split(",") | ForEach { |