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($computername=$(throw "-computername is required"), $username=$(throw "-username is required"), $password=$(throw "-password is required")) | |
<# | |
.SYNOPSIS | |
Bootstraps a server for use with WinRM. | |
Requires running under a username which is an adminstrator on remote machine. | |
Requires PSEXEC from sysinternals | |
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
set-executionpolicy Unrestricted | |
winrm quickconfig -quiet | |
enable-wsmancredssp -role client -delegatecomputer * |
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.Diagnostics; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Crtypto | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
<# | |
Report on unmerged changesets for release planning. | |
#> | |
function get_unmerged_changesets($source, $target) | |
{ | |
write-host "getting unmerged changesets for $source and $target" | |
$changesets = @() | |
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
set-psdebug -strict | |
# bleh | |
# | |
$global:boxes = @{} | |
<# | |
Here we are defining an internal PowerShell DSL for creating 'boxes'. |
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
# complete rip off of http://blog.mirthlab.com/2012/05/25/cleanly-retrying-blocks-of-code-after-an-exception-in-ruby/ | |
# | |
# usage | |
# retriable -tries 5 -action { do-work-that-could-throw-exception } | |
# | |
function retriable($tries=3, $interval=1, [scriptblock]$action) | |
{ |
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
$arg1 = "hello1" | |
$arg2 = "hello2" | |
$p = $(start-process -filepath .\bin\debug\hello.exe -argumentlist $arg1 -nonewwindow -passthru; start-process -filepath .\bin\debug\hello.exe -argumentlist $arg2 -nonewwindow -passthru); | |
#$p | wait-process | |
[console]::TreatControlCAsInput = $true | |
while($true) |
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
write-host "machine $($env:computername)" | |
write-host "hello, $($env:computername) " | |
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
<!-- snippet showing how referencing print.js --> | |
<script type="text/javascript" src="../WorkItemGlass.Metro.UI/js/viewModels.js"></script> | |
<script type="text/javascript" src="../WorkItemGlass.Metro.UI/js/print.js"></script> | |
<script type="text/javascript" src="../WorkItemGlass.Metro.UI\pages\login\loginViewModel.js"></script> |
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($machineName = $(hostname)) | |
Configuration SuperAppWeb | |
{ | |
Node ($machineName) | |
{ | |
<# | |
nothing happens when trying to use this resource? | |
#> | |
Website DefaultSite |