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
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Text; | |
namespace TarExample | |
{ | |
public class Tar | |
{ |
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
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Specialized; | |
using System.Net; | |
using System.Text; | |
//A simple C# class to post messages to a Slack channel | |
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet | |
public class SlackClient | |
{ |
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
<!-- | |
The GenerateVersionInfo task will generate the VersionInfo.cs file with the | |
metadata for the current build. | |
--> | |
<UsingTask TaskName="GenerateVersionInfo" | |
TaskFactory="CodeTaskFactory" | |
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | |
<ParameterGroup> |
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
################################################## | |
# | |
################################################## | |
param( | |
[Parameter(Mandatory = $true)][String]$subscriptionId, | |
[Parameter(Mandatory = $true)][String]$storageAccountName, | |
[Parameter(Mandatory = $true)][String]$affinityGroupName, | |
[Parameter(Mandatory = $true)][String]$imageName = 'MSFT__Windows-Server-2012-Datacenter-201208.01-en.us-30GB.vhd', | |
[Parameter(Mandatory = $true)][String]$adminPassword, |
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
protected void Application_Start() | |
{ | |
//... | |
Bundle cssBundle = new Bundle("~/Content/css", new LessTransform().Then(new CssMinify())); | |
cssBundle.AddFile("~/Content/site.css", throwIfNotExist: false); | |
cssBundle.AddDirectory("~/Content/", "jquery.mobile*", searchSubdirectories: false, throwIfNotExist: false); | |
BundleTable.Bundles.Add(cssBundle); | |
//... |
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
@echo off | |
:: normalize folder | |
SET folder=%~1 | |
IF %folder:~-1%==\ SET folder=%folder:~0,-1% | |
:: random number from 8000 to 9999 | |
SET /a port=(%random%)*1999/32767+8000 | |
:: start the web server for the random port starting at the passed-in directory |