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
exec master.dbo.sp_foreachdb | |
'USE ? | |
IF NOT EXISTS (SELECT 1 FROM sys.database_principals WHERE name = ''Domain\UserOrGroup'') | |
BEGIN | |
CREATE USER [Domain\UserOrGroup] FROM LOGIN [Domain\UserOrGroup] | |
END | |
exec sp_addrolemember ''db_backupoperator'', ''IQMETRIXHO\Development''; | |
' | |
GO |
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
-- This script copies a database. The paths in this script are designed to run on IQ-RGVSQL009. | |
-- You need to have SQLCMD mode enabled to run this script (Query menu -> SQLCMD Mode). | |
:setvar DbToBackup "SeedCore" -- The database to copy from. | |
:setvar DbToRestore "Developer_DanS" -- The database to create/overwrite. | |
:setvar Environment "" -- Should be either "Test", "Automation", or an empty string (for Dev). Corresponds to the Sql Server Instance the DB is on. | |
:setvar TruncateDevDatabases "True" -- Leave this as 'True' to not keep full logs for the DbToRestore on the Dev Sql Server Instance. | |
:setvar PutAutomationDbOnSlowDrive "True" -- Leave this as 'True' to restore the DbToRestore to the Slow hard drive on the Automation Sql Server Instance. | |
USE [master] |
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
Set-StrictMode -Version Latest | |
$TFS_TEAM_PROJECT_COLLECTION_URI = 'YourProjectCollectionUrl' # e.g. https://tfs.YourDomain.com/tfs/ProjectCollection | |
Function RevertField ($WorkItemCollection, $FieldName) | |
{ | |
$WorkItemCount = $WorkItemCollection.Count | |
$WorkItemCounter = 0 | |
Foreach ($WorkItem in $WorkItemCollection) { |
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
Windows Registry Editor Version 5.00 | |
; This will cause Visual Studio to display additional info in the Output pane as to why a project was rebuilt, even if you had just built it. | |
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\General] | |
"U2DCheckVerbosity"=dword:00000001 |
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([string] $PfxFilePath, $Password) | |
# You may provide a [string] or a [SecureString] for the $Password parameter. | |
$absolutePfxFilePath = Resolve-Path -Path $PfxFilePath | |
Write-Output "Importing store certificate '$absolutePfxFilePath'..." | |
Add-Type -AssemblyName System.Security | |
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 | |
$cert.Import($absolutePfxFilePath, $Password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet") |
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 Version ApplicationVersion = new Version("1.11.2"); | |
private void MainWindow_Loaded(object sender, RoutedEventArgs e) | |
{ | |
// If this is a ClickOnce deployment, append the ClickOnce Revision to the version number (as it gets updated with each publish). | |
if (ApplicationDeployment.IsNetworkDeployed) | |
ApplicationVersion = new Version(ApplicationVersion.Major, ApplicationVersion.Minor, ApplicationVersion.Build, ApplicationDeployment.CurrentDeployment.CurrentVersion.Revision); | |
// Display the Version as part of the window title. | |
wndMainWindow.Title += ApplicationVersion; |
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
// If we are running via ClickOnce, we need to adjust the path where the log files are written to, otherwise they won't be written at all. | |
if (ApplicationDeployment.IsNetworkDeployed) | |
{ | |
var dataDirectory = ApplicationDeployment.CurrentDeployment.DataDirectory; | |
foreach (var appender in LogManager.GetRepository().GetAppenders()) | |
{ | |
var fileAppender = appender as FileAppender; | |
if (fileAppender != null) | |
{ | |
var pathToReplace = Directory.GetParent(Directory.GetParent(fileAppender.File).FullName).FullName; |
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
#Requires -Version 2.0 | |
# Recursive function to calculate the total number of files and directories in the Zip file. | |
function GetNumberOfItemsInZipFileItems($shellItems) | |
{ | |
[int]$totalItems = $shellItems.Count | |
foreach ($shellItem in $shellItems) | |
{ | |
if ($shellItem.IsFolder) | |
{ $totalItems += GetNumberOfItemsInZipFileItems -shellItems $shellItem.GetFolder.Items() } |
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
# This .editorconfig file should live outside of all repositories (and thus not be committed to source control) in | |
# a parent directory, as it includes personal preference settings, like a tab's `indent_size`. | |
# v1.3 | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = crlf | |
indent_style = tab |
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
# This file should only include settings that affect the physical contents of the file, not just how it appears in an editor. | |
# Do not include personal preference presentation settings like a tab's `indent_size` in this file; those should be specified | |
# in a parent .editorconfig file outside of the repository. | |
# v1.7 - Source: https://gist.github.com/deadlydog/bd000162e85c155b243a712c16f7411c | |
# Ensure that personal preference presentation settings can be inherited from parent .editorconfig files. | |
root = false | |
#### Core EditorConfig Options #### |
OlderNewer