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 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 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
// 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 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
<!--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 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
# 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 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
# 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 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
using System; | |
using NSubstitute; | |
using NSubstitute.Exceptions; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace Tests | |
{ | |
[TestClass] | |
public class Class1 | |
{ |
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
Func<int> func = () => 1; | |
Expression<Func<int>> expression = Expression.Lambda<Func<int>>(Expression.Call(func.Method)); |
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
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using MvcContrib.TestHelper; | |
using NSubstitute; |
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
# commit | |
git add filenametocommit.cs | |
git commit -m 'Commit comment' | |
# add remote url | |
git remote add origin git://url.here | |
# change remote url | |
git remote set-url origin git://new.url.here |
OlderNewer