git init
or
get-childitem . -include *.sln -recurse | foreach ($_) { nuget restore $_.FullName -verbosity detailed} | |
get-childitem . -include *.png -recurse | foreach ($_) { pngout "$_"} |
public class DebugTimer : IDisposable | |
{ | |
private readonly System.Diagnostics.Stopwatch _watch; | |
private readonly string _blockName; | |
/// <summary> | |
/// Creates a timer. | |
/// </summary> | |
/// <param name="blockName">Name of the block that's being timed</param> | |
public DebugTimer(string blockName) |
<# | |
.Synopsis | |
Returns the install .NET Framework versions. | |
.Description | |
The script looks through the registry using the notes from the below | |
MSDN links to determine which versions of .NET are installed. |
# Auto detect text files and perform LF normalization | |
* text=auto | |
# Custom for Visual Studio | |
*.cs diff=csharp |
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst 1password | |
cinst 7zip | |
cinst 7zip.install | |
cinst AdobeAIR | |
cinst adobereader | |
cinst Atom | |
cinst markdownpad2 |
using Octokit; | |
var client = new GitHubClient(new ProductHeaderValue("scriptcs")) | |
{ | |
Credentials = new Credentials(user, password) | |
}; | |
// find all merged PRs | |
var filter = new PullRequestRequest() { State = ItemState.Closed }; | |
var owner = "scriptcs"; | |
var repo = "scriptcs"; | |
var milestone = "v0.10"; | |
var labels = new Dictionary<string, string>{ { "feature", "New" }, { "bug", "Fixed" } }; | |
var username = "adamralph"; | |
var oAuthToken = "secret"; | |
var client = Require<OctokitPack>().CreateWithOAuth("ScriptCs.ReleaseNotesScript", username, oAuthToken); | |
var issues = client.Issue.GetForRepository(owner, repo, new RepositoryIssueRequest { State = ItemState.Closed, }).Result; |
public interface IEmailSender | |
{ | |
void Send(string recipient, string subject, string htmlBody); | |
} | |
public class EmailSender : IEmailSender | |
{ | |
private readonly IEmailSettings _settings; | |
public EmailSender(IEmailSettings settings) |
public enum Cacheability | |
{ | |
NoCache, | |
Private, | |
Public, | |
} |