This file contains hidden or 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
############################# | |
# Mercilessly copied from https://github.com/kvarv/Continuous-Delivery | |
############################# | |
function TeamCity-TestSuiteStarted([string]$name) { | |
Write-Output "##teamcity[testSuiteStarted name='$name']" | |
} | |
function TeamCity-TestSuiteFinished([string]$name) { | |
Write-Output "##teamcity[testSuiteFinished name='$name']" |
This file contains hidden or 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
#Modified and simplified version of https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/ | |
$subscription = "[Your Subscription Name]" | |
$service = "[Your Azure Service Name]" | |
$slot = "staging" #staging or production | |
$package = "[ProjectName]\bin\[BuildConfigName]\app.publish\[ProjectName].cspkg" | |
$configuration = "[ProjectName]\bin\[BuildConfigName]\app.publish\ServiceConfiguration.Cloud.cscfg" | |
$timeStampFormat = "g" | |
$deploymentLabel = "ContinuousDeploy to $service v%build.number%" | |
Write-Output "Running Azure Imports" |
This file contains hidden or 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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Xml.XPath; | |
using System.Xml.Xsl; | |
using System.IO; | |
using System.Reflection; | |
using System.Xml; |
This file contains hidden or 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
/*! | |
* $.convertJSONDates | |
* | |
* $.getJSON(…).pipe($.convertJSONDates).done(function(data){…}) | |
* | |
* Based on … | |
* | |
* jQuery.parseJSON() | |
* http://erraticdev.blogspot.com/2010/12/converting-dates-in-json-strings-using.html | |
* |
This file contains hidden or 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 ( | |
[string]$RoomNumber = (Read-Host "The room to post to (default: 123456) "), | |
[string]$Message = (Read-Host "The message to send ") | |
) | |
$defaultRoom = "123456" | |
if ($RoomNumber -eq "") { | |
$RoomNumber = $defaultRoom | |
} | |
$authToken = "YOUR AUTH TOKEN" |
This file contains hidden or 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
Function Invoke-ElevatedCommand { | |
<# | |
.DESCRIPTION | |
Invokes the provided script block in a new elevated (Administrator) powershell process, | |
while retaining access to the pipeline (pipe in and out). Please note, "Write-Host" output | |
will be LOST - only the object pipeline and errors are handled. In general, prefer | |
"Write-Output" over "Write-Host" unless UI output is the only possible use of the information. | |
Also see Community Extensions "Invoke-Elevated"/"su" | |
.EXAMPLE |
This file contains hidden or 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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or 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
#full details now available: http://tiredblogger.wordpress.com/2011/12/28/finding-todos-and-reporting-in-powershell/ | |
param( | |
#this is appalling; there has to be a better way to get the raw name of "this" directory. | |
[string]$DirectoryMask = (get-location), | |
[array]$Include = | |
@("*.spark","*.cs","*.js","*.coffee","*.rb"), | |
[array]$Exclude = | |
@("fubu-content","packages","build","release"), | |
[switch]$Html, |
This file contains hidden or 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
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |