Skip to content

Instantly share code, notes, and snippets.

View MikeLarned's full-sized avatar

Mike Larned MikeLarned

View GitHub Profile
@MikeLarned
MikeLarned / MsBuild.Commands.txt
Created January 24, 2012 04:30
MsBuild Commands
--Deploy Package to Site defined in package parameters.xml
msdeploy -source:package=MyPackage.zip -dest:auto -verb:sync
--PSake
task deploy -depends package {
$p = "$packages_dir\$package";
exec { & .\$msdeploy "-source:package=$p" "-dest:auto" "-verb:sync" }
}
--reset after .gitignore change
git rm -r --cached .
git add .
git commit -a -m "M"
--prune remote
git fetch -p
--branch delete safe (ensures changes branch b are already in the current branch)
@MikeLarned
MikeLarned / SearchIQuery.cs
Created February 5, 2012 18:48
Search IQuery Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using MedTest.Infrastructure.Entitys;
using NHibernate;
using NHibernate.Linq;
using MedTest.Infrastructure.NHibernate;
namespace MedTest.Core.Domain.Employees.Query
@MikeLarned
MikeLarned / SeachIQuery2.cs
Created February 5, 2012 19:10
Search IQuery Example 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using NHibernate;
using NHibernate.Linq;
namespace Test.Core.Domain
{
@MikeLarned
MikeLarned / SQLWhileCounter.sql
Created February 13, 2012 18:50
SQL While with Counter
begin tran
declare @count int
set @count = 0
while (@count < 40)
begin
insert into dbo.Inventory VALUES ('' + CONVERT(varchar, @count) , 1000)
@MikeLarned
MikeLarned / SkeletonBlog.html
Created February 16, 2012 05:47
Skeleton Blog
<div class="container">
<div class="sixteen columns">
<h1 class="remove-bottom" style="margin-top: 40px">Mike Larned</h1>
<h5>[email protected]</h5>
<hr />
</div>
<div class="sixteen columns">
<h3>A Free Blog with GitHub Pages and Skeleton</h3>
<div>
<p>Gotta love free stuff. You can setup a mini blog using <a href='http://pages.github.com/'>GitHub Pages</a> and the <a href='http://www.getskeleton.com/'>Skeleton</a> template in about 10 minutes. Skeleton is a boilerplate html template
@MikeLarned
MikeLarned / SkeletonBlogComplete.html
Created February 16, 2012 06:10
Skeleton Blog Complete
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
@MikeLarned
MikeLarned / SkeletonBlogComplete.html
Created February 16, 2012 06:10
Skeleton Blog Complete
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
@MikeLarned
MikeLarned / MultiTenantStructureMap.cs
Created March 1, 2012 16:48
MultiTenant StructureMap Bootstrap
public class BootStrapper
{
public static void MultiTenant(IContainerResolver containerResolver, ITenantSelector tenantSelector)
{
ObjectFactory.Configure(x =>
{
x.For<IContainerResolver>().Use(containerResolver);
x.For<ITenantSelector>().Use(tenantSelector);
});
@MikeLarned
MikeLarned / Repository
Created March 17, 2012 17:35
Repository
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using NHibernate;
using NHibernate.Linq;
namespace BMobile.Infrastructure.Entitys
{
public class Repository : IRepository