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
| var query = from c in linq.Customers | |
| select c; | |
| query = query.WithPath(path => | |
| path.Prefetch<Order>(c => c.Orders) | |
| .SubPath(subpath => subpath.Prefetch(o => o.Product)); | |
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
| In your ~/.gitconfig: | |
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| In powershell profile: |
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
| //global.asax | |
| RouteTable.Routes.Add("ProductsRoute", new Route | |
| ( | |
| "products/apparel", | |
| new CustomRouteHandler("~/Products/ProductsByCategory.aspx", | |
| "category=18") | |
| )); | |
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
| # Takes a repository which has autocrlf set to true and changes it to false using powershell | |
| # Turn autocrlf off | |
| git config core.autocrlf false | |
| # Remove all files | |
| git rm --cached -r . | |
| # Re-add all files | |
| git diff --cached --name-only | foreach { git add $_ } |
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
| //Grid Model | |
| public class MyGridModel : GridModel<Person> { | |
| private HtmlHelper _html; | |
| public MyGridModel() { | |
| ColumnFor(x => _html.ActionLink("Whatever")); | |
| } | |
| public MyGridModel Build(HtmlHelper html) { |
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
| # First you'll need to download posh-hg from one of the following locations: | |
| # http://github.com/JeremySkinner/posh-hg | |
| # http://poshhg.codeplex.com | |
| # Add the following code to your profile.ps1 (usually in C:\Users\User\Documents\WindowsPowershell) | |
| # Import the posh-hg module from wherever it is saved | |
| Import-Module "Path\To\posh-hg" | |
| # Override the default prompt behaviour: |
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
| # My Mercurial/svn workflow using hgsubversion | |
| # Get latest changes from svn: | |
| hg pull --rebase | |
| # hack away on some code... | |
| # Commit to local hg repo | |
| hg commit |
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
| # tpager.py - browse command output with an external pager using temp files | |
| # | |
| # Copyright 2008 David Soria Parra <dsp@php.net> | |
| # Copyright 2010 Eduard STEFAN <alexandrul.ct@gmail.com> | |
| # | |
| # This program is free software; you can redistribute it and/or modify it | |
| # under the terms of the GNU General Public License as published by the | |
| # Free Software Foundation; either version 2 of the License, or (at your | |
| # option) any later version. | |
| # |
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
| [defaults] | |
| addremove = --similarity 80 | |
| glog = --style="C:/Documents/My Dropbox/Scripts/mercurial-cli-templates/map-cmdline.sglog" | |
| push = --branch . | |
| revert = --no-backup | |
| log = --style="C:/Documents/My Dropbox/Scripts/mercurial-cli-templates/map-cmdline.slog" | |
| attic-unshelve = --delete |
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
| # powershell script for syncing a mercurial repository with a git repository. | |
| # Usage: HgSync.ps1 NameOfProject git://github.com/Path/To/RemoteGitRepo.git https://Path/To/RemoteHgRepository | |
| # Requires the hg-git plugin http://hg-git.github.com/ | |
| $project = $args[0] | |
| $gitrepo = $args[1] | |
| $hgrepo = $args[2] | |
| $path = "D:\hg-sync\$project" | |
| function hg { |