Skip to content

Instantly share code, notes, and snippets.

View sholsinger's full-sized avatar

Steve Holsinger sholsinger

View GitHub Profile
@sholsinger
sholsinger / logparse.php
Created October 12, 2011 06:15
A quick 'n' dirrrty PHP script to parse IIS log files and insert them into a relational database table. (ala MySQL)
<?
define("DEBUG", FALSE);
function get_log_file($file_path)
{
if(file_exists($file_path))
{
return file_get_contents($file_path);
}
return false;
@sholsinger
sholsinger / image_resize.rb
Created August 2, 2012 05:06
Quick and Dirty Image Resizing with Ruby & RMagick
#!/usr/bin/ruby
require "RMagick"
# ensure dirs are available for writing
["thumbs","full","processed"].each do |dir|
if !File.directory? dir
Dir.mkdir dir
end
end
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>CreateResponse</wsa:Action>
<wsa:MessageID>urn:uuid:fcb12801-6f5c-4e13-aed4-3b2c444dea4c</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:f41fef8d-63fc-482b-b4f3-8a41680c587b</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-f8c1e842-f068-4281-87e8-82ac5b994f50">
<wsu:Created>2014-06-02T17:15:32Z</wsu:Created>
<wsu:Expires>2014-06-02T17:20:32Z</wsu:Expires>
@sholsinger
sholsinger / sfcc-b2c-docs-as-search-engine.md
Last active July 31, 2023 03:13
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. It will walk you through adding a cusom SFCC B2C search engine shortcut to your Chrome profile.

Updated 2023-07-30

Setup

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

@sholsinger
sholsinger / README.md
Created February 23, 2021 04:11
Automating SFCC B2C Pricebook Site Assignment

Assigning a Pricebook to a Site Automatically

The list of pricebooks that should be active is saved in a system-level Site Preference called, SitePriceBooks. This value can be set by importing a preferences.xml file in a site import/export archive. The value of this site preference should be a colon (:) separated list of pricebook IDs. eg:

<preference preference-id="SitePriceBooks">list-prices:sale-prices</preference>

The entire file should look like the following code snippet: