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 FeatureViewLocationRazorViewEngine : RazorViewEngine | |
{ | |
public FeatureViewLocationRazorViewEngine() | |
{ | |
ViewLocationFormats = new[] | |
{ | |
"~/Features/{1}/{0}.cshtml", | |
"~/Features/{1}/{0}.vbhtml", | |
"~/Features/Shared/{0}.cshtml", | |
"~/Features/Shared/{0}.vbhtml", |
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
--- | |
-- This file is intended to be used with cmder | |
-- http://bliker.github.io/cmder/ | |
-- | |
-- Replace your existing <path_to_cmder>\config\git.lua with this file | |
-- This will append the branch status to your prompt, e.g. [ahead 1, behind 2] | |
-- It basically takes the output of git status -sb and appends it (with coloring) to the cmder prompt (before the lambda) | |
--- | |
--- |
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
function SetPowerPlan([string]$PreferredPlan) | |
{ | |
Write-Host "Setting Powerplan to $PreferredPlan" | |
$guid = (Get-WmiObject -Class win32_powerplan -Namespace root\cimv2\power -Filter "ElementName='$PreferredPlan'").InstanceID.tostring() | |
$regex = [regex]"{(.*?)}$" | |
$newpowerVal = $regex.Match($guid).groups[1].value | |
# setting power setting to high performance | |
powercfg -S $newpowerVal | |
} |
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
######## Phil's dev VM boxstarter script ######## | |
############### | |
#### notes #### | |
############### | |
### running remotely on VM fails on Configuring CredSSP settings | |
## check http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/30/understanding-powershell-remote-management.aspx | |
### running locally on VM |
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
<Query Kind="Program" /> | |
private string[] projectExtensionExclusions = new[] { ".vdproj", ".ndproj", ".wdproj", ".shfbproj" }; | |
private string rootFolder = @"C:\Users\Pascal\Dev\MyProject"; | |
void Main() | |
{ | |
LoadAllProjects(); | |
LoadAllPackagesConfig(); | |
GenerateDGML(Path.Combine(rootFolder, "Dependencies.dgml")); |
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 DatabaseFixture | |
{ | |
private readonly string DataDirectory = AppDomain.CurrentDomain.BaseDirectory; | |
private const string DatabaseName = "TestDb"; | |
private const string DbFilename = DatabaseName + ".mdf"; | |
private const string DbLogFilename = DatabaseName + "_log.ldf"; | |
private const string TestDbConnectionStringName = "TestDb"; | |
private const string MasterDbConnectionStringName = "MasterDb"; | |
private string DbPath => Path.Combine(DataDirectory, DbFilename); | |
private string DbLogPath => Path.Combine(DataDirectory, DbLogFilename); |
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
// -------------------------------------------------------------------------------------- | |
// A simple FAKE build script that: | |
// 1) Hosts Suave server locally & reloads web part that is defined in 'app.fsx' | |
// 2) Deploys the web application to Azure web sites when called with 'build deploy' | |
// | |
// Source: https://github.com/tpetricek/suave-xplat-gettingstarted/blob/master/build.fsx | |
// -------------------------------------------------------------------------------------- | |
#r "packages/FSharp.Compiler.Service/lib/net45/FSharp.Compiler.Service.dll" | |
#r "packages/Suave/lib/net40/Suave.dll" | |
#r "packages/FAKE/tools/FakeLib.dll" |
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
void Main() | |
{ | |
var input = new long[,] { {1, 2}, {1, 3}, {1, 4} }; | |
var fractions = | |
from i in Enumerable.Range(0, input.GetUpperBound(0) + 1) | |
select Tuple.Create(input[i,0], input[i,1]); | |
var denoms = fractions.Select(t => t.Item2).ToArray(); | |
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
/* *** SQL Server Date Calculations *** */ | |
-- First day of prior month | |
SELECT DATEADD(mm, DATEDIFF(mm,0,DATEADD(mm,-1-DATEPART(day,GetDate()),GetDate())),0) /*first day of prior month*/ | |
-- Last month | |
SELECT CAST(DATEPART(m, GetDate())-1 AS INT) /*last month*/ | |
-- Current year | |
SELECT CAST(DATEPART(yyyy, GetDate())AS INT) /*current year*/ | |
-- Current day | |
SELECT CAST(DATEPART(dd, GetDate())AS INT) /*current day*/ | |
-- First day of current year |
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
http://slickdeals.net/forums/showpost.php?p=6480998&postcount=1 | |
Vista Blocked Programs at Startup- Fix Once and for All | |
I have the VISTA HOME Premium and like the VISTA Basic I do not have Security Policy Control on my non-VISTA Apps. Mad If you have Windows Vista Ultimate then you do. So here is a way too once and for all to fix that VISTA tray BLOCKED APP alert that is quite annoying in that you are alerted with every bootup that your app is blocked and you must allow the app to run each time by giving VISTA permission blessing. Boo on that. So here is the fix: | |
Remove the startup app that is offending by: | |
Start----Run----and type in msconfig.exe | |
Go to STARTUP Tab and remove the app that is blocked by Vista noting on a sheet of paper where the program is run from. If the program app is run from the startup menu, then just go to Start---All Program Files---Startup Folder and remove the app there. |
OlderNewer