Skip to content

Instantly share code, notes, and snippets.

View bdukes's full-sized avatar

Brian Dukes bdukes

View GitHub Profile
<div class="folio-template">
<div class="rotate-wrap">
<engage:list>
<div class="engage-content">
<engage:img src="%#ImageUrl%" alt="%#Title%"/>
<div class="footer">
<div class="title"><engage:literal text="%#Title%"/></div>
<div class="desc"><engage:literal text="%#Content%"/></div>
</div>
</div>
@bdukes
bdukes / web.config Binding Redirect for System.Web.Extesions.xml
Created February 2, 2011 15:09
The section of the web.config that needs to be added to rebind reference to System.Web.Extensions (ASP.NET AJAX) 1.0 to the version that comes with .NET 3.5. <runtime> element is at the same level as <system.web> and <system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\HttpModules;bin\Providers;bin\Modules;bin\Support;" />
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
@bdukes
bdukes / DataReaderEnumerable.cs
Created March 16, 2011 18:58
The DataReaderEnumerable is a simple class that wraps an IDataReader and implements IEnumerable<IDataReader>. This allows all of the LINQ methods to be used on an IDataReader.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.CodeAnalysis;
/// <summary>
/// Enumerates over an <see cref="IDataReader"/> instance, moving to the next record upon each enumeration.
/// </summary>
/// <remarks>
@bdukes
bdukes / config
Created April 5, 2011 17:46
git-svn section from git config file
[svn-remote "svn"]
url = https://svn.example.com/svn/your-project
fetch = :refs/remotes/git-svn
@bdukes
bdukes / config
Created April 5, 2011 17:49
git-tfs section from git config file
[tfs-remote "default"]
url = http://tfs.example.com:8080/tfs
repository = $/Project/Sub Project/Etc/Etc
fetch = refs/remotes/default/master
@bdukes
bdukes / web.config
Created May 5, 2011 13:55
Assembly binding redirect for Ajax Control Toolkit. <runtime> element is at the same level as <system.web> and <system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\HttpModules;bin\Providers;bin\Modules;bin\Support;" />
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" />
<bindingRedirect oldVersion="0.0.0.0-99.99.99.99" newVersion="4.1.50401.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
@bdukes
bdukes / ClearPortal.cs
Created June 7, 2011 18:18
Attempts to clear DotNetNuke page output cache. Using the PE MemoryOutputCachingProvider
OutputCachingProvider.Instance(Host.PageCachingMethod).PurgeCache(portalId);
@bdukes
bdukes / Skin.ascx
Created December 7, 2011 17:48
DNN Skin with Client Capability checks
<%@ Control Language="C#" AutoEventWireup="false" Inherits="DotNetNuke.UI.Skins.Skin" %>
<%@ Import Namespace="DotNetNuke.Services.ClientCapability" %>
<div class="<%= ClientCapabilityProvider.CurrentClientCapability.IsTouchScreen ? "touch-please" : "no-touching" %>">
<div id="ContentPane" runat="server"></div>
</div>
.blog .main {
float: left;
width: 61.111111111111%; /* 550px / 900px */
}
.blog .adside {
float: right;
width: 36.7777778%; /* 331px / 900px */
}
@bdukes
bdukes / Template.htm
Created February 7, 2012 22:55
Engage: Rotator Template With Template Value in Attribute
<div class="rotate-wrap">
<engage:list>
<div class="image" style="background:url('<engage:Literal Text='%#ImageUrl%' />');height:250px;width:100px;"></div>
</engage:list>
</div>