Skip to content

Instantly share code, notes, and snippets.

View jessgusclark's full-sized avatar

Jesse Clark jessgusclark

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jessgusclark on github.
  • I am jesseclark (https://keybase.io/jesseclark) on keybase.
  • I have a public key whose fingerprint is 12C4 57F4 5723 2C0B F2A0 B8D0 1FB5 0390 FBB1 F92C

To claim this, I am signing this object:

@jessgusclark
jessgusclark / page.aspx
Created August 27, 2015 20:26
Nested Repeaters in C#
<%@ Import Namespace="System.Data" %>
---
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<h2><%# DataBinder.Eval(Container, "DataItem[\"FirstLetter\"]")%></h2>
<ul>
<asp:Repeater ID="Repeater2" runat="server"
@jessgusclark
jessgusclark / object.js
Created October 20, 2015 20:00
Convert Object to JSON
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using UNCWebcomm;
using System.Runtime.Serialization; //Add Reference to
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var minifyCss = require('gulp-minify-css');
gulp.task('sass', function () {
gulp.src('./source/sass/**/*.scss')
.pipe(sass().on('error', sass.logError))
@jessgusclark
jessgusclark / int-loop-xslt.xslt
Last active February 8, 2016 22:55
Integer Loop in XSLT
<xsl:template name="main-template">
<xsl:call-template name="remaining-template-loop">
<xsl:with-param name="total" select="10"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="remaining-template-loop">
<xsl:param name="total" />
<xsl:param name="count" select="1" />
<xsl:if test="$count &lt; $total">
@jessgusclark
jessgusclark / xsl-snippet.xsl
Created March 26, 2016 20:00
Remove JavaScript from OmniUpdate Pages
<xsl:template match="ouc:div/*/script|ouc:div/script">
<xsl:comment>Scripts in the content region have been disabled.</xsl:comment>
</xsl:template>
@jessgusclark
jessgusclark / tag-loop.xsl
Last active April 14, 2016 15:10
Tag Management Demo
<xsl:variable name="page-path" select="replace($ou:path, '.html', '.pcf')" />
<xsl:for-each select="doc( concat('ou:/Tag/GetTags?', 'site=', $ou:site, '&amp;path=', $page-path ) )/tags/tag">
<li><xsl:value-of select="name" /></li>
</xsl:for-each>
@jessgusclark
jessgusclark / GetDataFilesWithTag.xsl
Last active March 10, 2017 23:32
Get All Files with the Tag of the page.
<xsl:template name="GetDataFilesWithTag">
<!-- Get the current file's path -->
<xsl:variable name="current-page"
select="concat('ou:/Tag/GetTags?', 'site=', $ou:site, '&amp;path=', replace($ou:path, '.html', '.pcf')" />
<!-- Get the first Tag that is associated with this subject listing page -->
<xsl:variable name="page-tag" select="doc( $current-page ) )/tags/tag[1]/name" />
<!-- Get Data Files With the Tag -->
<!-- Template that takes a URL and formats the content: -->
<xsl:template name="GetContentFromSingleDataFile">
<xsl:param name="data-url" />
<!-- Get the full path to the data file: -->
<xsl:variable name="full-path" select="concat($ou:root, $ou:site, $data-url)" />
<!-- Get Data File Content -->
<xsl:variable name="page-content" select="doc($full-path)/document" />
<!-- Template that takes a URL and formats the content: -->
<xsl:template name="GetContentFromSingleDataFile">
<xsl:param name="data-url" />
<!-- Get the full path to the data file: -->
<xsl:variable name="full-path" select="concat($ou:root, $ou:site, $data-url)" />
<!-- Get Data File Content -->
<xsl:variable name="page-content" select="doc($full-path)/document" />