I hereby claim:
- I am devlead on github.
- I am devlead (https://keybase.io/devlead) on keybase.
- I have a public key whose fingerprint is 477F E77B F054 8C1F C0CE A7F1 F678 07BF C550 2BA9
To claim this, I am signing this object:
#load "./customtool.cake" | |
#load "./mytools.cake" | |
GitStatus(); | |
GitBranch(new CustomToolSettings { ToolPath = "/bin/git.exe" }); |
I hereby claim:
To claim this, I am signing this object:
(irm https://raw.githubusercontent.com/git-tips/tips/master/tips.json)|sort {random}|select -First 1|% {"$($_.title)`r`n$($_.tip)" } |
# Get last 100 log entries as a PowerShell object | |
$gitHist = (git log --format="%ai`t%H`t%an`t%ae`t%s" -n 100) | ConvertFrom-Csv -Delimiter "`t" -Header ("Date","CommitId","Author","Email","Subject") | |
# Now you can do iterate over each commit in PowerShell, group sort etc. | |
# Example to get a commit top list | |
$gitHist|Group-Object -Property Author -NoElement|Sort-Object -Property Count -Descending | |
# Example do something for each commit | |
$gitHist|% {if ($_.Author -eq "Mattias Karlsson") {"Me"} else {"Someone else"} } |
<staticContent> | |
<remove fileExtension=".woff" /> | |
<mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | |
<remove fileExtension=".woff2" /> | |
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /> | |
</staticContent> |
<# | |
.SYNOPSIS | |
This is a Powershell script to dump console buffer as html to file. | |
.DESCRIPTION | |
This Powershell script will iterate over the current console buffer and | |
output it as html preserving colors. | |
.PARAMETER FilePath |
Param( | |
[ValidateScript( | |
{ | |
$countries = ((Invoke-RestMethod -Uri https://raw.githubusercontent.com/devlead/ISO-3166-Countries-with-Regional-Codes/master/all/all.json)| % Name) | |
if ( $countries -contains $_) | |
{ | |
$true | |
} | |
else | |
{ |
DROP TABLE dbo.Events | |
DROP TABLE dbo.Streams | |
CREATE TABLE dbo.Streams( | |
StreamId CHAR(40) NOT NULL, | |
StreamIdOriginal NVARCHAR(1000) NOT NULL, | |
StreamIdInternal INT IDENTITY(1,1) NOT NULL, | |
IsDeleted BIT NOT NULL DEFAULT ((0)), | |
CONSTRAINT PK_Streams PRIMARY KEY CLUSTERED (StreamIdInternal) | |
); |
Param( | |
[string]$SubscriptionName = ((Get-AzureSubscription|?{$_.SubscriptionName -like "*MSDN*"})[0].SubscriptionName), | |
[string]$AzureVMImageName = "03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-Ultimate-Update4-AzureSDK-2.5-Win8.1-x64" | |
) | |
function InstallWinRMCert($serviceName, $vmname) | |
{ | |
$winRMCert = (Get-AzureVM -ServiceName $serviceName -Name $vmname | select -ExpandProperty vm).DefaultWinRMCertificateThumbprint | |
$AzureX509cert = Get-AzureCertificate -ServiceName $serviceName -Thumbprint $winRMCert -ThumbprintAlgorithm sha1 | |