Skip to content

Instantly share code, notes, and snippets.

Paul Stack stack72

Block or report user

Report or block stack72

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@stack72
stack72 / ConduitQuartzFacility.cs
Created May 27, 2011 — forked from codereflection/ConduitQuartzFacility.cs
Custom Quartz Facility for Castle Windsor to dynamically set the quartz_jobs.xml
View ConduitQuartzFacility.cs
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;
View gist:1056347
[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);
View gist:1118221
public List<string> GetAllUserEmailAddresses()
{
var listEmails = new List<string>();
var users = GetAllUsers();
foreach(var user in users)
{
listEmails.Add(GetUserEmailAddress(user.Id);
}
}
View gist:1328385
<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>
View gist:1328389
<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>
View gist:1335132
$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!
View gist:1505812
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
View gist:1767591
http://<user name>:<user password>@<server address>/httpAuth/action.html?add2Queue=<build type Id>
View gist:5597978
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
)
View gist:5598480
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 }\"",
You can’t perform that action at this time.