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
public class ElasticSearchEventService : IEventService | |
{ | |
private readonly ElasticsearchSink _nativeSink; | |
public ElasticSearchEventService(IElasticSearchEventConfig conf) | |
{ | |
var elasticsearchSinkOptions = new ElasticsearchSinkOptions(conf.ElasticSearchUri); | |
_nativeSink = new ElasticsearchSink(elasticsearchSinkOptions); | |
} |
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
## Octopus Azure deployment script, version 1.0 | |
## -------------------------------------------------------------------------------------- | |
## | |
## This script is used to control how we deploy packages to Windows Azure. | |
## | |
## When the script is run, the correct Azure subscription will ALREADY be selected, | |
## and we'll have loaded the neccessary management certificates. The Azure PowerShell module | |
## will also be loaded. | |
## | |
## If you want to customize the Azure deployment process, simply copy this script into |
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
<# | |
.SYNOPSIS | |
Modifies some Azure cscfg entries that Octopus Deploy 2.0 is not able to as of today. | |
.DESCRIPTION | |
Sets the thumbprint of the first certificate value. Sets the instance count for each role. Octopus-variables must match either of the two forms: | |
Azure.Role[rolename].Instances | |
Azure.Role[rolename].Certificate | |
where rolename is the roleName as defined in the ServiceConfiguration.Cloud.csfcg. | |
The config file must be named ServiceConfiguration.Cloud.cscfg. | |
#> |
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
## Octopus Azure deployment script, version 1.0 | |
## -------------------------------------------------------------------------------------- | |
## | |
## This script is used to control how we deploy packages to Windows Azure. | |
## | |
## When the script is run, the correct Azure subscription will ALREADY be selected, | |
## and we'll have loaded the neccessary management certificates. The Azure PowerShell module | |
## will also be loaded. | |
## | |
## If you want to customize the Azure deployment process, simply copy this script into |
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
# helper to update ps sessions env variables | |
function Update-Environment { | |
$locations = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment', | |
'HKCU:\Environment' | |
$locations | ForEach-Object { | |
$k = Get-Item $_ | |
$k.GetValueNames() | ForEach-Object { | |
$name = $_ | |
$value = $k.GetValue($_) |
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
#r "Faggruppe.MyBusiness.dll" | |
using System; | |
using Faggruppe.MyBusiness; | |
var person = new Person(); | |
for(int i =1; i < 6; i++) | |
{ | |
var person = new Person(); | |
var spoken = person.Speak(); |
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
[Test] | |
public void InterfaceImplementations_Always_ShouldBeInjected() | |
{ | |
var interfaces = _source.OfType<InterfaceDeclarationSyntax>().Select( | |
x => x.Identifier.ToString() | |
); | |
var classes = _source.OfType<ClassDeclarationSyntax>(); | |
var implementsInterface = classes.Where( | |
c => ( |
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.Net.Http; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Dispatcher; | |
using Ninject; | |
namespace WebApiNinjectIHttpControllerActivator | |
{ | |
public class NinjectKernelActivator: IHttpControllerActivator | |
{ |
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://howtonode.org/connect-it | |
// 1: store original | |
// 2: overwrite existing method with new function with extra functionality | |
// 3: in new function from 2, call the original method stored in 1. | |
module.exports = function logItSetup() { | |
// Initialize the counter | |
var counter = 0; |
NewerOlder