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
| //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
| 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
| 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
| <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> | |
| <% int count = 0; %> | |
| <% for (int i = 0; i < ((ICollection)Model).Count; i++) { %> | |
| <input type="hidden" name="<%= ViewData.TemplateInfo.GetFullHtmlFieldName("") %>[<%= i %>]" /> | |
| <% } %> |
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
| <Database Name="Test" xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007"> | |
| <Function Name="CustomersAndOrders" Method="CustomersAndOrders"> | |
| <ElementType Name="FluentLinqToSql.DatabaseTests.Entities.Customer" /> | |
| <ElementType Name="FluentLinqToSql.DatabaseTests.Entities.Order" /> | |
| </Function> | |
| </Database> |
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
| This is in my %userprofile%/.gitconfig | |
| [alias] | |
| cia = !git add -A && git 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
| $files = dir -recurse | where { $_.PSIsContainer -eq $false -and (get-content($_.FullName)).Length -gt 1000 } | |
| $count = $files.Count |
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
| //Query is marked as cacheable, but the query cache is never used. | |
| var rooms = session.CreateQuery("from Room order by Name") | |
| .SetCacheable(true) | |
| .List<Room>(); |
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
| # Script to download the latest NHprof build | |
| # Note that this script requires the 7zip command line (http://www.7-zip.org/) | |
| #configuration | |
| $installDir = "C:\Projects\tools\nhprof" | |
| $downloadDir = "C:\Temp\Nhprof" | |
| $7zipexe = "C:\Program Files\7-Zip\7z.exe" | |
| $url = "http://builds.hibernatingrhinos.com/downloadLatest/nhprof" | |
| $file = "$downloadDir\NHProf.zip" |