Skip to content

Instantly share code, notes, and snippets.

@Vaccano
Vaccano / web.confg
Created November 2, 2012 22:49
OrignalWeb.Config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding maxBufferSize="5242880"
maxBufferPoolSize="5242880"
maxReceivedMessageSize="5242880">
<readerQuotas maxArrayLength="16384"
maxStringContentLength="5242880" />
</binding>
</basicHttpBinding>
@Vaccano
Vaccano / TableInsert.sql
Created August 28, 2012 16:20
TableInsert.sql
create table #MyTable(MyValue int, MyGroup varchar(5))
insert into #MyTable values
(56,'I'), (12,'I'), (56, 'II'), (12, 'II'), (56, 'III'), (56, 'IV'), (56, 'V'), (12, 'V')
select MyValue, MyGroup
from #MyTable
@Vaccano
Vaccano / UserIsInRequiredGroup.cs
Created August 7, 2012 21:58
UserIsInRequiredGroup
/// <summary>
/// Get the required status of any authorizations and verify that the user is in those groups.
/// Currently only supports Application Groups (no direct use of DB users or AD Groups or users).
/// Though an Application Group can have those kind of users and this will work fine.
/// </summary>
/// <param name="app">Application to check</param>
/// <param name="operation">Operation to check</param>
/// <param name="identity">User to check for</param>
/// <returns>True if the user is in all required groups (or if there are no required groups).</returns>
private static bool GetUserIsInAllRequiredGroups(IAzManApplication app, IAzManItem operation, WindowsIdentity identity)
@Vaccano
Vaccano / NuGet Post Build
Created May 29, 2012 17:39
NuGet Post Build
echo ProjectDll = $(OutDir)\$(AssemblyName).dll
echo BuildingInsideVisualStudio = $(BuildingInsideVisualStudio)
echo Configuration = $(ConfigurationName)
IF '$(BuildingInsideVisualStudio)'=='true' (
if '$(ConfigurationName)' == 'Release' "$(SolutionDir).nuget\NuGet.exe" pack "$(ProjectDir)\$(MSBuildProjectFile)" -Prop Configuration=Release ) ELSE (
if '$(ConfigurationName)' == 'Release' "$(SolutionDir).nuget\NuGet.exe" pack "$(ProjectDir)\$(MSBuildProjectFile)" -Prop Configuration=Release -Prop TargetPath="$(OutDir)\$(AssemblyName).dll" -OutputDirectory "$(OutDir)."
xcopy "$(OutDir)$(AssemblyName).*.nupkg" "\\SomeComputer\developer\NuGet Repository" )
@Vaccano
Vaccano / OrderContract.Cs
Created October 18, 2011 19:22
OrderContract
[DataContract]
public class OrderContract
{
[DataMember]
public Guid OrderTwinCheck { get; set; }
[DataMember]
public long? OrderId { get; set; }
[DataMember]
public long OrderableId { get; set; }
[DataMember]
@Vaccano
Vaccano / logfile.txt
Created September 27, 2011 18:36
ApexSQL Intellitrace Log File
2011-09-27 12:11:41.792 16624 18740 WARN: Option's definition file not found C:\Users\UserName\AppData\Local\ApexSQL\ApexSQLEdit2011\FormattingOptions.xml
2011-09-27 12:11:42.320 16624 18740 WARN: Option's definition file not found C:\Users\UserName\AppData\Local\ApexSQL\ApexSQLEdit2011\FormattingOptions.xml
2011-09-27 12:11:42.474 16624 18740 INFO: (CacheCore.cs) CacheIO() - reading local cache from localcache.log BEGIN;
2011-09-27 12:11:42.483 16624 18740 INFO: SyncXMLtoData begin
2011-09-27 12:11:42.488 16624 18740 INFO: (CacheCore.cs) CacheIO() - reading local cache from localcache.log END;
2011-09-27 12:11:42.490 16624 18740 INFO: Logging initialized, application starting up
2011-09-27 12:11:42.492 16624 18740 INFO: GUI prereqs set
2011-09-27 12:11:42.506 16624 18740 INFO: Other prereqs check passed
2011-09-27 12:11:42.511 16624 18740 INFO: Folder confirmed writable
2011-09-27 12:11:42.555 16624 18740 INFO: Native Source Control drivers loaded.
@Vaccano
Vaccano / Address.cs
Created July 6, 2011 19:12
Address.cs
namespace PatientEntities
{
public partial class Address
{
#region Primitive Properties
public virtual long AddressId
{
get;
set;
}
@Vaccano
Vaccano / patient.cs
Created July 6, 2011 19:11
Patient.cs
namespace PatientEntities
{
public partial class Patient
{
#region Primitive Properties
public virtual long PatientId
{
get;
set;
}
@Vaccano
Vaccano / VersionedBuild.xaml
Created June 23, 2011 20:24
VersionedBuild.xaml
<Activity mc:Ignorable="sap" x:Class="TfsBuild.Process" this:Process.BuildSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()]" this:Process.TestSpecs="[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec(&quot;**\*test*.dll&quot;))]" this:Process.BuildNumberFormat="$(BuildDefinitionName)_$(Version)" this:Process.CleanWorkspace="[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" this:Process.RunCodeAnalysis="[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]" this:Process.SourceAndSymbolServerSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]" this:Process.AgentSettings="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamF
@Vaccano
Vaccano / gist:989888
Created May 24, 2011 22:24
QueryWithXMLDatatype
-- actual xml of the test case's steps
DECLARE @docParam varchar(max)
-- Get the XML for the steps of the test case
SELECT TOP 1 @docParam = txt.Words
FROM Fields flds (NOLOCK)
JOIN WorkItemLongTexts txt (NOLOCK)
ON flds.FldID = txt.FldID
WHERE txt.ID=4447
and flds.ReferenceName = 'Microsoft.VSTS.TCM.LocalDataSource'