I hereby claim:
- I am niaher on github.
- I am niaher (https://keybase.io/niaher) on keybase.
- I have a public key ASBktBkUBBhH4rZTMKTq-GQt26QcxCoLnnj4-F9hNkQK5go
To claim this, I am signing this object:
// This is an auto-generated file. | |
<#@ template language="C#" hostSpecific="true" debug="True" #> | |
<#@ output extension="cs" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="EnvDte" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ import namespace="System" #> |
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ | |
"URLDownloadToFileA" (ByVal pCaller As Long, _ | |
ByVal szURL As String, _ | |
ByVal szFileName As String, _ | |
ByVal dwReserved As Long, _ | |
ByVal lpfnCB As Long) As Long | |
Public Sub GURoL(url As String, FileName As String) | |
Dim lngRetVal As Long | |
lngRetVal = URLDownloadToFile(0, url, FileName, 0, 0) |
function Test-SqlConnection { | |
param( | |
[Parameter(Mandatory)] | |
[string]$ConnectionString | |
) | |
$ErrorActionPreference = 'Stop' | |
try { | |
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $ConnectionString |
/*------------------------------------------------------------------------------------ | |
Server login | |
-----------------------------------------------------------------------------------*/ | |
if not exists (select 1 from sys.server_principals where name = N'MyDatabaseUser') | |
create login [MyDatabaseUser] | |
with password = 'password', | |
default_database = [MyDatabase], | |
check_policy = off, | |
check_expiration = off | |
go |
$one = Get-ChildItem "C:\x" -Recurse -Include @("*.html", "*.js") | |
$two = Get-ChildItem "C:\y" -Recurse -Include @("*.html", "*.js") | |
Compare-Object -ReferenceObject $one -DifferenceObject $two -Property Name,Length -ExcludeDifferent -IncludeEqual |
;with Counters as ( | |
select Id, | |
row_number() over (partition by GroupingColumn order by GroupingColumn asc) as [Counter] | |
from RequisitionLine | |
) | |
update T | |
set T.[Counter] = C.[Counter] | |
from MyTable T inner join Counters C on T.Id = C.Id |
# This script configures IIS application pool and site. | |
# This script needs to be run once on each machine where the app is deployed. | |
# Run this file in powershell with admin rights. For example to deploy release config: | |
# PS > server-setup.ps1 -Target release | |
param ( | |
[Parameter(Mandatory=$true, | |
HelpMessage="Name of the build (e.g. - local, debug, release, etc)")] | |
[string]$Target | |
) |
# This script configures IIS application pool and app. | |
# example usage: | |
# PS> init-server.ps1 -AppName MyApp -TargetComputers computer1,computer2 -PSSessionUser $(PSSessionUser) -PSSessionPassword $(PSSessionPassword) -AppPoolUser $(AppPoolUser) -AppPoolPassword $(AppPoolPassword) | |
param( | |
[Parameter(Mandatory=$true)][string]$AppName, | |
[string]$TargetComputers, | |
[string]$PSSessionUser, | |
[string]$PSSessionPassword, | |
[string]$AppPoolUser, |
msbuild "MyApp.Database/MyApp.Database.sqlproj" ` | |
/t:"Build;Publish" ` | |
/p:SqlPublishProfilePath="MyApp.Database.automated-tests.publish.xml" ` | |
/p:UpdateDatabase=True ` | |
/p:PublishScriptFileName="publish-script.sql" |
I hereby claim:
To claim this, I am signing this object: