Skip to content

Instantly share code, notes, and snippets.

View jsheely's full-sized avatar

Jonathan Sheely jsheely

View GitHub Profile
/* Reto Egeter, fullparam.wordpress.com */
DECLARE @SearchStrTableName nvarchar(255), @SearchStrColumnName nvarchar(255), @SearchStrColumnValue nvarchar(255), @SearchStrInXML bit, @FullRowResult bit, @FullRowResultRows int
SET @SearchStrColumnValue = '%thirtytech%' /* use LIKE syntax */
SET @FullRowResult = 1
SET @FullRowResultRows = 3
SET @SearchStrTableName = NULL /* NULL for all tables, uses LIKE syntax */
SET @SearchStrColumnName = NULL /* NULL for all columns, uses LIKE syntax */
SET @SearchStrInXML = 0 /* Searching XML data may be slow */
var gulp = require('gulp');
var useref = require('gulp-useref');
var gulpif = require('gulp-if');
var less = require('gulp-less');
var clean = require('gulp-clean');
var watch = require('gulp-watch');
var plumber = require('gulp-plumber');
var seq = require('run-sequence');
@jsheely
jsheely / gist:3d49cb87dd57cfbf28d6
Created November 12, 2015 23:51 — forked from sl4m/gist:5091803
create self-signed certificate for localhost
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
var people = [{
name: 'Jon',
location: 'New York, NY'
}, {
name: 'Joe',
location: null
}, {
name: 'Tom',
location: 'San Francisco, CA'
}];
var models = [{
name: 'Jonathan',
location: 'Earth'
}, {
name: 'Joe',
location: 'Mars'
}]
models.forEach(function(model) {
@jsheely
jsheely / UnlockDNN.aspx
Created July 27, 2014 23:43
Unlock DNN through password resets or creation of super users.
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="Newtonsoft.Json" %>
<script runat="server">
public string ResultJson { get; set; }
public class Result
{
public string Status { get; set; }
@jsheely
jsheely / gist:0e547b0e80ef11062790
Created June 18, 2014 17:56
DNN Available URL Provider Settings
AUM_AllowDebugCode
AUM_AutoAsciiConvert
AUM_DoNotRedirectHttpsUrlRegex
AUM_DoNotRedirectUrlRegex
AUM_DoNotRewriteRegEx
AUM_DoNotUseFriendlyUrlRegex
AUM_EnableCustomProviders
AUM_ForceLowerCase
AUM_IgnoreUrlRegex
AUM_KeepInQueryStringRegex
@jsheely
jsheely / IIS-ReWrite-Remove-ASPX.xml
Last active August 31, 2017 12:43
IIS Url ReWrite rule to remove .aspx extension
<rule name="san aspx">
<!--Removes the .aspx extension for all pages.-->
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
@jsheely
jsheely / LayoutController.vb
Created June 12, 2013 04:22
Ventrian News Articles. Enable date formatter on custom properties.
If (layoutArray(iPtr + 1).ToUpper().StartsWith("CUSTOM:")) Then
Dim field As String = layoutArray(iPtr + 1).Substring(7, layoutArray(iPtr + 1).Length - 7)
Dim customFieldID As Integer = Null.NullInteger
Dim objCustomFieldSelected As New CustomFieldInfo
Dim isLink As Boolean = False
Dim objCustomFieldController As New CustomFieldController
Dim objCustomFields As ArrayList = objCustomFieldController.List(objArticle.ModuleID)
@jsheely
jsheely / gist:5596901
Created May 17, 2013 04:19
Web.config settings for CORS support. Add to System.webServer node
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>