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 ActionResult Sorting(GridSortOptions sort) | |
{ | |
// If there's no sort option specifed, then default to sorting on the Name column. | |
if(string.IsNullOrEmpty(sort.Column)) { | |
sort = new GridSortOptions { Column = "Name" }; | |
} | |
ViewData["sort"] = sort; |
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
before_each { | |
write-host "I will be written before each test is run" | |
} | |
when "True is true" { | |
assert { $true -eq $true } | |
} | |
when "True is false, the world may explode" { | |
assert { $true -eq $false } "True should be false" |
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
@Html.Grid(Model).Columns(column => { | |
column.Custom( | |
@<div> | |
<em>Hello there</em> | |
<strong>@item.Name</strong> | |
</div> | |
).Named("Custom Column"); | |
}) |
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 abstract class StepBase<T,TProperty, TSelf> : IConfigurable<PropertyRule<T>, TSelf> where TSelf : StepBase<T, TProperty, TSelf> { | |
... | |
} |
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
# 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 { |
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
[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 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 <[email protected]> | |
# Copyright 2010 Eduard STEFAN <[email protected]> | |
# | |
# 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 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 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 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) { |