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
namespace Helpers | |
{ | |
using System; | |
using System.Text.RegularExpressions; | |
public class HtmlHelper | |
{ | |
private static Regex tags = new Regex("<[^>]*(>|$)", RegexOptions.Singleline | RegexOptions.ExplicitCapture | RegexOptions.Compiled); | |
private static Regex whitelist = new Regex( |
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
SELECT SUM(reserved_page_count) * 8.0 / 1024 AS MB | |
FROM sys.dm_db_partition_stats |
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
# git-ls-files --others --exclude-from=.git/info/exclude | |
# Lines that start with '#' are comments. | |
# For a project mostly in C, the following would be a good set of | |
# exclude patterns (uncomment them if you want to use them): | |
# *.[oa] | |
# *~ | |
*.o | |
*.sdf | |
*.lo | |
*.la |
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
-- select * from sys.dm_exec_query_stats | |
SELECT QS.execution_count, | |
SUBSTRING(QT.TEXT, QS.statement_start_offset/2 + 1, | |
(CASE WHEN QS.statement_end_offset = -1 THEN LEN(CONVERT(NVARCHAR(MAX), qt.TEXT)) * 2 | |
ELSE QS.statement_end_offset END - qs.statement_start_offset)/2) AS query_text, | |
QS.total_elapsed_time, QS.last_elapsed_time, QS.min_elapsed_time, QS.max_elapsed_time, | |
QS.total_rows, QS.last_rows, QS.min_rows, QS.max_rows, | |
QS.total_worker_time / QS.execution_count AS avg_cpu_time | |
FROM sys.dm_exec_query_stats AS QS |
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
mklink /d "%PathToLinkDestinationFolder%" "%PathToSourceFolder%" |
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
<!-- Add the following line inside the Target Name='CheckPrerequisites' of the NuGet.targets --> | |
<SetEnvironmentVariable EnvKey="EnableNuGetPackageRestore" EnvValue="true" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " /> |
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
@ECHO OFF | |
setlocal | |
cd /D %~dp0 | |
SET WebSiteProjectFilePath=%1 | |
SET WebSiteProdPath=C:\inetpub\%2 | |
SET IISAppPool=%2 | |
SET IISBinding=%3 | |
SET IISSiteName=%4 | |
SET SqlServer=%5 |
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
@echo off | |
setlocal | |
CD /d "%~dp0" | |
SET SiteName=%1 | |
SET WebSitePath=%2 | |
SET SSLPort=%3 | |
"%ProgramFiles%\IIS Express\appcmd" add site /name:"%SiteName%" /physicalPath:"%WebSitePath%" /bindings:https/*:%SSLPort%:localhost |
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
@echo off | |
REM Replace 'git pull –all' with your desired command and run this in the folder where you have all the TK repositories located. | |
for /f "delims=" %%d in ('dir /ad/b') do if exist %%d\.git ( | |
cd %%d | |
git pull --all | |
cd.. | |
) | |
pause |