Skip to content

Instantly share code, notes, and snippets.

View AlphaGit's full-sized avatar

Alpha AlphaGit

View GitHub Profile
@AlphaGit
AlphaGit / each_with_index.js
Created December 12, 2012 17:56 — forked from burin/each_with_index.coffee
Each block iterator for handlebars.js, supporting a zero-based index property.
// {{#each_with_index records}}
// <li class="legend_item{{index}}"><span></span>{{Name}}</li>
// {{/each_with_index}}
Handlebars.registerHelper("each_with_index", function(array, block) {
var buffer = "";
for (var i = 0, j = array.length; i < j; i++) {
var item = array[i];
// stick an index property onto the item, starting with 0, may make configurable later
class ClientA
{
public virtual List<Invoice> Invoices { get; set; }
//...
public Product GetMostBuyedProduct(DateTime from, DateTime to)
{
//...
}
@AlphaGit
AlphaGit / markup.html
Created December 28, 2011 19:26 — forked from tathamoddie/markup.html
One color to rule them all.
<div id="foo"><div class="bar">Baz</div></div>