Skip to content

Instantly share code, notes, and snippets.

@coridrew
coridrew / churn.sh
Last active August 29, 2015 14:02 — forked from caseysoftware/churn.sh
git log --name-only | grep xaml | sort | uniq -c | sort -Descending > xaml-files-by-tfs-commit-count.txt
What it does:
- looks at the git log file, retrieving just the filenames;
- greps to extract xaml filenames;
- sorts the list of files to get the duplicates together;
- eliminates the duplicates but keeps a count of them;
- resorts the file names by that count; and
- writes the list to a txt file named xaml-files-by-tfs-commit-count.txt
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
context.Response.ContentType = "application/force-download";
context.Response.AddHeader("content-disposition", "attachment; filename=Current-OptIns_" + DateTime.UtcNow.ToString("yyyyMMddHHmm") + "utc.xls");
List<ExpandoObject> optInList = DbServices.GetCurrentOptIns(optInList);
DataTable dt = optInList.ToDataTable();
GridView gv = new GridView();
gv.DataSource = dt;
@coridrew
coridrew / GitTfsOutput.ps
Created February 17, 2012 16:30
git tfs help for @dahlbyk
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
D:\Workspace\Git\Clones\APOCWebsite_MRFBranch [B-01609 +0 ~1 -0 | +0 ~1 -0]> git tfs help
Usage: git-tfs [command] [options]
bootstrap
checkin
checkintool (ct)
cleanup
cleanup-workspaces