Skip to content

Instantly share code, notes, and snippets.

View karolikl's full-sized avatar

Karoline Klever karolikl

View GitHub Profile
@karolikl
karolikl / gist:a7be56be079f2ea624d6
Created February 17, 2015 12:01
Add server to Network Load Balancer
Import-Module NetworkLoadBalancingClusters
function Start-Node(){
$nodeName = $OctopusParameters['NLBNodeName'];
Write-Host "Starting node with name: $nodeName"
$nodeResult = Start-NlbClusterNode $nodeName
$state = $nodeResult.State.ToString()
Write-Host "State of $nodeName is $state"
if ($state.ToString() -NotMatch "converged"){
@karolikl
karolikl / gist:ebec6f0e2d45b026132b
Created February 17, 2015 12:00
Remove server from Network Load Balancer
Import-Module NetworkLoadBalancingClusters
function Stop-Node(){
$nodeName = $OctopusParameters['NLBNodeName'];
Write-Host "Stopping node with name: $nodeName"
$nodeResult = Stop-NlbClusterNode $nodeName -Drain -Timeout 10
$state = $nodeResult.State.ToString()
Write-Host "State of $nodeName is $state"
if ($state.ToString() -NotMatch "stopped"){
@karolikl
karolikl / gist:fe0f2cbb8e3b164c0f35
Created November 19, 2014 10:08
Challenge - How would you mock MyPayment?
public class MyPayment : Payment
{
public MyPayment() : base(MyPaymentMetaClass) // Passing in Null for MetaClass will blow up
{
// ...
}
}
/* This class is in a third party assembly, I cannot change this. */
public class Payment : OrderStorageBase
@karolikl
karolikl / example.js
Created September 24, 2013 06:23
Welcome to your first Gist! Gists are simple code reminders. Whenever you come across a piece of code you think might be useful later on, save it as a Gist. With GistBox, you can also tag the Gist with a label. This is especially useful for keeping them organized by language, project or purpose. For more info about GistBox, visit: http://www.gi…
// log an object to the browser console
console.log({ text: "foobar" });