Skip to content

Instantly share code, notes, and snippets.

@stack72
stack72 / ConduitQuartzFacility.cs
Created May 27, 2011 22:04 — forked from codereflection/ConduitQuartzFacility.cs
Custom Quartz Facility for Castle Windsor to dynamically set the quartz_jobs.xml
using System;
using System.Linq;
using Castle.Core.Configuration;
using Castle.Facilities.QuartzIntegration;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.Registration;
using Quartz;
using Quartz.Job;
using Quartz.Spi;
[TestCase("/categoryName/itemname", "/sitebaseaddress/hub/categoryName.aspx")]
public void GetDestinationUrl_ValidUrls_ReturnsCorrectDestionation(string url, string expected)
{
var mappingLoader = Substitute.For<IMappingLoader>();
var cacheHandler = Substitute.For<IMappingCacheHandler>();
var httpContext = Substitute.For<IHttpContextFacade>();
var mapping = new List<Data>();
httpContext.GetAppPath().Returns("/sitebaseaddress/");
cacheHandler.Load<Data>().Returns(mapping);
public List<string> GetAllUserEmailAddresses()
{
var listEmails = new List<string>();
var users = GetAllUsers();
foreach(var user in users)
{
listEmails.Add(GetUserEmailAddress(user.Id);
}
}
<h2>Quick Links</h2>
<div class="navigation">
<ul>
<li><a href="#1">Link 1</a></li>
<li><a href="#2">Link 2</a></li>
<li><a href="#3">Link 3</a></li>
<li><a href="#4">Link 4</a></li>
</ul>
</div>
<nav>
<h2>Quick Links</h2>
<ul>
<li><a href="#1">Link 1</a></li>
<li><a href="#2">Link 2</a></li>
<li><a href="#3">Link 3</a></li>
<li><a href="#4">Link 4</a></li>
</ul>
</nav>
$test_assemblies = (Get-ChildItem "$src_folder" -Recurse -Include *Test.dll, *Tests.dll)
this will select everything as expected but I want to exclude some folder types
*\obj
*\package
*\debug
Please Help!
ADODB.dll
Dao.dll
Ipdmctrl.dll
Microsoft.mshtml.dll
Microsoft.Office.Interop.Access.dll
Microsoft.Office.Interop.Excel.dll
Microsoft.Office.Interop.FrontPage.dll
Microsoft.Office.Interop.FrontPageEditor.dll
Microsoft.Office.Interop.Graph.dll
Microsoft.Office.Interop.InfoPath.dll
http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build type Id>
Write-Host('Enabling Dynamic Compression in IIS')
Import-Module ServerManager
Add-WindowsFeature Web-Dyn-Compression
Write-Host("Adding dynamic compression types")
$compressions= @(
@{name ='dynamictypes'; mimeType='application/json'; enabled='True'}
#Add more here in an array declaration of its own
)
We have the following in /modules/manage_windows_feature/manifests.init.pp
define manage_windows_feature($feature_name = $title) {
$powershell_cmd = "powershell.exe"
$exec_policy = "-executionpolicy remotesigned"
exec { "install-feature-${feature_name}" :
command => "$powershell_cmd ${exec_policy} -Command \"Import-Module ServerManager; Add-WindowsFeature ${feature_name}\"",
path => "C:\\Windows\\sysnative\\WindowsPowershell\\v1.0;${::path}",
onlyif => "${powershell_cmd} ${exec_policy} -Command \"Import-Module ServerManager; if((Get-WindowsFeature ${feature_name}).Installed) { exit 1 }\"",