Skip to content

Instantly share code, notes, and snippets.

View MikeLarned's full-sized avatar

Mike Larned MikeLarned

View GitHub Profile
@MikeLarned
MikeLarned / PageParseFilter
Created December 22, 2010 03:21
PageParseFilter
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
</pages>
@MikeLarned
MikeLarned / PS-Search-Certificate
Created June 28, 2011 18:05
PowerShell - Search Certificate By Thumbnail
Get-ChildItem cert:\LocalMachine -Recurse | where-object {$_.Thumbprint -eq "<THUMBPRINT>" }
@MikeLarned
MikeLarned / .gitconfig
Created August 3, 2011 21:52
Git Config
[user]
email = [email protected]
name = Mike Larned
[merge]
tool = kdiff3
[core]
autocrlf = true
[alias]
st = status
ci = commit
@MikeLarned
MikeLarned / gist:1183946
Created August 31, 2011 16:25
Package Manager Console Update All Packages
Get-Package -Updates | ForEach-Object{ $id = $_.Id; Get-Project -All | ForEach-Object{ Update-Package -Id $id -ProjectName $_.ProjectName } }
@MikeLarned
MikeLarned / OrchardSetFolderPermissions.ps1
Created September 7, 2011 05:40
Orchard - Set Folder Permissions
function Set-Permissions {
param(
[string]$siteFolder,
[string]$userName
)
$folders = @("App_Data", "Themes", "Modules", "Media")
foreach($f in $folders) {
Write-Host "Setting Read/Write Access for $f"
@MikeLarned
MikeLarned / GacUtil.ps1
Created January 5, 2012 21:36
Powershell GacUtil - Updating GAC Assemblies with PS
$gacUtil = "${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\gacutil.exe";
function Add-GacItem([string]$path) {
#Full Path Name or Relative - ex: C:\Temp\Larned.dll
& $gacutil "/nologo" "/i" "$path"
}
function Remove-GacItem([string]$name) {
@MikeLarned
MikeLarned / PsBtsServicePublisher.ps1
Created January 5, 2012 23:10
Powershell Wrapper for BtsWcfServicePublisher
$btsPublisher = "${Env:ProgramFiles(x86)}\Microsoft BizTalk Server 2010\BtsWcfServicePublishing.exe";
#Tool Download - http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21973
function Create-BtsServices([string]$file) {
# File is an WcfServiceDescription xml document describing the services to be generated including:
# Location - IIS Site to publish services. SVC files are written to IIS Site's physical location found in Metabase.
# Services - WCFService node for each service to be created
# MessageType - WcfMessageType per Service node that points to a schema in the GAC (or FS) that will provide the contract for the service
& $btsPublisher "$serviceDescriptionFile"
@MikeLarned
MikeLarned / RequireJsDefineBackbone.js
Created January 17, 2012 04:33
Require JS - Module for Backbone, Underscore and Jquery
define(['jquery', 'underscore', 'backbone'], function ($, _, Backbone) {
var initialize = function () {
User = Backbone.Model.extend({
initialize: function () {
alert("New User " + this.get("name"));
}
});
var user1 = new User({ name: "Mike" });
@MikeLarned
MikeLarned / RequireJsImpliedDependency.htm
Created January 17, 2012 04:53
Implied dependency in JavaScript script tags
<head>
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="../../Scripts/order.js" type="text/javascript"></script>
<script src="../../Scripts/libs/backbone.js" type="text/javascript"></script>
<script src="../../Scripts/libs/underscore.js" type="text/javascript"></script>
</head>
@MikeLarned
MikeLarned / PSake.MsBuildPackage.ps1
Created January 24, 2012 04:27
PSake - MsBuild Package WebSite
task package {
$p = $dev_package -f $buildNumber, $date
exec { msbuild $web_proj "/T:Package" "/P:Configuration=$configuration;PackageLocation=$packages_dir\$p;DeployIisAppPath=$destination_site" }
}