Skip to content

Instantly share code, notes, and snippets.

View alastairs's full-sized avatar

Alastair Smith alastairs

View GitHub Profile
public ActionResult Record(int id)
{
Record record = repository.Load(id);
var viewModel = new { record.Id, record.Name, record.Description, record.Url /* etc. */ };
return View(viewModel);
}
@alastairs
alastairs / Expand-AllArchives
Created December 20, 2010 10:56
PowerShell one-liner to extract all archives in a directory (requires the PSCX).
ls |% { pushd $_; ls *.zip |%{ Expand-Archive $_; rm $_} popd }