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
* 1X Dyno supports about 5 threads so use 2X Dyno | |
* DB pool | |
* Add database.yml for production now | |
* Unicorn 1 | |
* Puma per web concurrency | |
* Sidekiq per concurrency | |
* Remove redis sizes | |
* PX dyno? | |
* More dynos | |
* 1-2 threads can share a database pool |
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 MvcApp : System.Web.HttpApplication { | |
protected void Application_Start() { | |
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("iPhone") | |
{ | |
ContextCondition = (context => context.GetOverriddenUserAgent().IndexOf | |
("iPhone", StringComparison.OrdinalIgnoreCase) >= 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
// ripped this off from this stackoverflow.com answer: | |
// http://stackoverflow.com/a/8824250/34315 | |
using System.IO; | |
using System.Reflection; | |
try | |
{ | |
//The code that causes the error goes here. | |
} |
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
<!--put this in %USERPROFILE%\IISExpress\config--> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<configSections> | |
<sectionGroup name="system.applicationHost"> | |
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> | |
</sectionGroup> | |
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
# Create a directory | |
mkdir -p site/public | |
New-Item -ItemType directory -Path site/public | |
#create filename.txt | |
touch filename.txt | |
echo $null > filename |
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
# create the link | |
> mklink /d c:\ruby "C:\Program Files (x86)\Ruby-1.9.2" | |
#run the gem install command | |
> c:\ruby\bin\gem install rails | |
# delete the link | |
> ??? |
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
using System; | |
using NSubstitute; | |
using NSubstitute.Exceptions; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace Tests | |
{ | |
[TestClass] | |
public class Class1 | |
{ |
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
Func<int> func = () => 1; | |
Expression<Func<int>> expression = Expression.Lambda<Func<int>>(Expression.Call(func.Method)); |
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
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using MvcContrib.TestHelper; | |
using NSubstitute; |