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
http://dba.stackexchange.com/a/112434 |
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 | |
Cls | |
:CheckServiceName | |
If "%~1"=="" Goto AskServiceName | |
Set Service=%~1 | |
Goto CheckDependencyServiceName | |
:AskServiceName |
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 | |
'public ' | |
+ CASE | |
WHEN c.DATA_TYPE IN ('bigint') THEN 'long' | |
WHEN c.DATA_TYPE IN ('int') THEN 'int' | |
WHEN c.DATA_TYPE IN ('smallint') THEN 'short' | |
WHEN c.DATA_TYPE IN ('tinyint') THEN 'byte' | |
WHEN c.DATA_TYPE IN ('decimal', 'numeric', 'smallmoney', 'money') THEN 'decimal' | |
WHEN c.DATA_TYPE IN ('real') THEN 'single' | |
WHEN c.DATA_TYPE IN ('float', 'decimal') THEN 'double' |
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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Remove WWW and Ensure HTTPS" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{HTTP_HOST}" pattern="^(www\.)" /> | |
<add input="{HTTPS}" pattern="^OFF$" /> | |
</conditions> | |
<action type="Redirect" url="https://mydomain.com/{R: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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Ensure HTTPS" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTPS}" pattern="^OFF$" /> | |
</conditions> | |
<action type="Redirect" url="https://mydomain.com/{R:1}" /> | |
</rule> |
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
REM http://manjitsinhal.blogspot.com.br/2013/04/how-to-export-site-list-and-bindings.html | |
Cd %windir%\system32\inetsrv | |
appcmd list site > c:\sites-list.txt |
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
<configuration> | |
<system.net> | |
<settings> | |
<servicePointManager | |
checkCertificateName="false" | |
checkCertificateRevocationList="false" /> | |
</settings> | |
</system.net> | |
</configuration> |
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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Ensure WWW" patternSyntax="Wildcard" stopProcessing="true"> | |
<match url="*" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="www.mydomain.com" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://www.mydomain.com/{R:1}" redirectType="Permanent" /> | |
</rule> |
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
public static class PipeExtensions | |
{ | |
public static TOut Then< TIn, TOut >(this TIn item, Func< TIn, TOut > fn) | |
{ | |
return fn(item); | |
} | |
} | |
public class PipeTest | |
{ |
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
String.prototype.formatUnicorn = String.prototype.formatUnicorn || | |
function () { | |
"use strict"; | |
var str = this.toString(); | |
if (arguments.length) { | |
var t = typeof arguments[0]; | |
var key; | |
var args = ("string" === t || "number" === t) ? | |
Array.prototype.slice.call(arguments) | |
: arguments[0]; |