npm list -g --depth=0
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
SELECT CONCAT(CEILING(RIBPS/POWER(1024,pw)),SUBSTR(' KMGT',pw+1,1)) | |
Recommended_InnoDB_Buffer_Pool_Size FROM | |
( | |
SELECT RIBPS,FLOOR(LOG(RIBPS)/LOG(1024)) pw | |
FROM | |
( | |
SELECT SUM(data_length+index_length)*1.1*growth RIBPS | |
FROM information_schema.tables AAA, | |
(SELECT 1.25 growth) BBB | |
WHERE ENGINE='InnoDB' |
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 class SubdomainRoute : RouteBase | |
{ | |
public override RouteData GetRouteData(HttpContextBase httpContext) | |
{ | |
if (httpContext.Request == null || httpContext.Request.Url == null) | |
{ | |
return null; | |
} | |
var host = httpContext.Request.Url.Host; |
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
#!/bin/sh | |
brew services restart --all |
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
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="HTTPS rewrite behind ELB rule" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions> | |
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" ignoreCase="false" /> | |
</conditions> | |
<action type="Redirect" redirectType="Found" url="https://{SERVER_NAME}{URL}" /> | |
</rule> |
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
<system.webServer> | |
<rewrite xdt:Transform="Insert"> | |
<rules> | |
<rule name="Add WWW prefix to requests to apex domain" > | |
<match url="(.*)" ignoreCase="true" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^thedomain\.com" /> | |
</conditions> | |
<action type="Redirect" url="https://www.thedomain.com/{R:1}" redirectType="Permanent" /> | |
</rule> |
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
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<appSettings> | |
<!-- adds --> | |
<add key="Key.To.Insert" value="The-Value-To-Insert" xdt:Transform="Insert" /> | |
<!-- replaces--> | |
<add key="Environment" value="Release" xdt:Transform="Replace" xdt:Locator="Match(key)" /> |
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 static string GetSafePath(string filePath) | |
{ | |
if (string.IsNullOrEmpty(filePath)) return string.Empty; | |
//Strip invalid chars | |
foreach (var invalidChar in Path.GetInvalidPathChars()) | |
{ | |
filePath = filePath.Replace(invalidChar.ToString(), String.Empty); | |
} |
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
{ | |
"EngineConfiguration": { | |
"PollInterval": "00:00:15", | |
"Components": [ | |
{ | |
"Id": "MemoryCounter", | |
"FullName": "AWS.EC2.Windows.CloudWatch.PerformanceCounterComponent.PerformanceCounterInputComponent,AWS.EC2.Windows.CloudWatch", | |
"Parameters": { | |
"CategoryName": "Memory", | |
"CounterName": "Available MBytes", |
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
{ | |
"IsEnabled": true, | |
"EngineConfiguration": { | |
"Components": [ | |
{ | |
"FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch", | |
"Id": "ApplicationEventLog", | |
"Parameters": { | |
"Levels": "1", | |
"LogName": "Application" |
OlderNewer