Skip to content

Instantly share code, notes, and snippets.

Steve Holsinger sholsinger

Block or report user

Report or block sholsinger

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
sholsinger /
Last active May 8, 2019
SFCC B2C Documentation as a Search Engine in your Browser

How to easily look up things in the SFCC B2C Docs from your URL bar

This guide is intended for use with Chrome, but this feature exists in several browsers. Add a search engine. Now that the SFCC B2C docs are publicly available, this shortcut can finally work. (Previously you had to re-authenticate periodically and then repeat your search)


Step 1 In Chrome, go to Settings > Search engine > Manage search engines (Or just navigate to: chrome://settings/searchEngines)

Step 2

View exacttarget_response.xml
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="" xmlns:wsa="" xmlns:wsse="" xmlns:wsu="">
<wsu:Timestamp wsu:Id="Timestamp-f8c1e842-f068-4281-87e8-82ac5b994f50">
sholsinger / image_resize.rb
Created Aug 2, 2012
Quick and Dirty Image Resizing with Ruby & RMagick
View image_resize.rb
require "RMagick"
# ensure dirs are available for writing
["thumbs","full","processed"].each do |dir|
if ! dir
Dir.mkdir dir
sholsinger / logparse.php
Created Oct 12, 2011
A quick 'n' dirrrty PHP script to parse IIS log files and insert them into a relational database table. (ala MySQL)
View logparse.php
define("DEBUG", FALSE);
function get_log_file($file_path)
return file_get_contents($file_path);
return false;
sholsinger / toKey.js
Created May 2, 2011
JavaScript method to convert a string into a reasonable "key" string.
View toKey.js
if(String.prototype.toKey === undefined)
String.prototype.toKey = function(){
var s = this.toLowerCase();
s = s.replace(/^[0-9_-]+|[^a-z0-9_\s-]|(\s.\s){1,}|[\s]{2,}|[_\s-]+$/ig, '');
s = s.replace(/[\-\s_]+/ig,"_");
return s;
sholsinger / inArray.vbs
Created Apr 26, 2011
VBScript tool for checking if a value is in an array.
View inArray.vbs
' returns the index of obj in array. obj can be anything. Returns -1 if not found.
Function inArray(arr, obj)
On Error Resume Next
Dim x: x = -1
If isArray(arr) Then
For i = 0 To UBound(arr)
If arr(i) = obj Then
x = i
Exit For
sholsinger / addBusinessDays.js
Created Apr 18, 2011
A JavaScript module to extend the Date prototype to provide an easy method for adding to or subtracting from a Date instance in business days.
View addBusinessDays.js
if(Number.prototype.mod === undefined)
Number.prototype.mod = function(n) {
return ((this%n)+n)%n;
if(Date.prototype.addBusinessDays === undefined)
Date.prototype.addBusinessDays = function(dd) {
var weeks = (dd >= 0) ? Math.floor(dd/5): Math.ceil(dd/5);
sholsinger / BusinessDayAdd.vbs
Created Apr 15, 2011
Visual Basic Script for doing "working day" arithmetic. Use this function to add or subtract business days from a VBScript date object.
View BusinessDayAdd.vbs
Function BusinessDayAdd(delta, dt)
dim weeks, days, day
weeks = Fix(delta/5)
days = delta Mod 5
day = DatePart("w",dt)
If (day = 7) And days > -1 Then
If days = 0 Then
days = days - 2
sholsinger / gist:901874
Created Apr 4, 2011
VBScript Tools for measuring the length of an array and appending values to a Dynamic array
View gist:901874
' appends the second argument to the first if the first is an array.
' MUST be a dynamic array! Returns new array.
' Usage:
' Dim myArray()
' myArray = ArrayAppend(myArray, "foo")
Function ArrayAppend( a, o )
On Error Resume Next
dim tn, i
i = 0
sholsinger / GetTableDefinitionADO.asp
Created Mar 9, 2011
Some functions to aid in "describing" a SQL table that you don't have direct SQL access to via COM ADO library.
View GetTableDefinitionADO.asp
Function GetTableDefinition( table_name, conn, id, idfield )
dim rs, fld, rec
dim where: where = ""
If IsNumeric(id) And id > 0 and idfield <> "" Then
where = " WHERE " & idfield & " = " & id
End If
You can’t perform that action at this time.