Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Samantha Branham glompix

I may be slow to respond.
Block or report user

Report or block glompix

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
# Your init script
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
# An example hack to log to the console when each text editor is saved.
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
glompix / avgitemsize.aspx
Created Aug 26, 2015
Calculate average item size for a Sitecore database
View avgitemsize.aspx
<%@ Page language="c#" %>
<%@ Import Namespace="Sitecore.Data.Items" %>
<!DOCTYPE html>
<title>Cache Admin</title>
<link rel="shortcut icon" href="/sitecore/images/favicon.ico" />
var db = Sitecore.Configuration.Factory.GetDatabase("master");
Func<Item[]> ReturnAllItems = () =>
glompix / ItemExtensions.cs
Last active Aug 29, 2015
Fix cache clear on remote publish in Sitecore language fallback module
View ItemExtensions.cs
public static Item GetFallbackItem(this Item item)
Assert.IsNotNull(item, "item cannot be null");
var success = false;
int iterations = 0, maxIterations = 5;
while (iterations++ < maxIterations)
var fallbackLang = item.Language.GetFallbackLanguage(item.Database);
if (fallbackLang != null &&
glompix / myplate-improvements.tamper.js
Last active Aug 29, 2015
UX improvements for's MyPlate.
View myplate-improvements.tamper.js
// ==UserScript==
// @name MyPlate Improvements
// @namespace
// @version 0.1
// @description A small set of improvements for LiveStrong's MyPlate app.
// @match*
// @copyright 2014, Stuart Branham
// ==/UserScript==
glompix / bootstrap-tab-order.js
Created Aug 15, 2013
Preserve tab order within Bootstrap tabbables.
View bootstrap-tab-order.js
/* tab-order.js
Preserve tab order within Bootstrap tabbables.
(function ($) {
var _tabKeyCode = 9;
var _tabbableSelector = ':input:not([type="hidden"]),a[href]'; // Links can be tabbed to too!
function getTabbableElements($el) {
return $el.find(_tabbableSelector);
glompix / bootstrap-combobox.js
Created Mar 28, 2013
Simple comboboxes (manually editable selects) for jQuery/Bootstrap. Quick and dirty.
View bootstrap-combobox.js
jQuery.fn.editableSelect = function () {
var selects = $(this).filter('select');
selects.each(function () {
// Add an edit button to the select control, bootstrap style.
var select = $(this);
select.wrap('<div class="input-append" />');
var editButton = $('<button class="btn" type="button" title="Enter your own value"><i class="icon-edit"></i></button>');
select.parent().append(editButton); () {
glompix / FuzzyStringComparer.cs
Last active Dec 15, 2015
String comparer pulled from and converted to C#. Wrote many years ago for a job.
View FuzzyStringComparer.cs
namespace Poop
public class FuzzyStringComparer
/// <summary>Computes lexical similarity of two strings, case insensitive.</summary>
/// <returns>Lexical similarity value in the range [0,1].</returns>
/// <remarks></remarks>
public static double CompareLexical(this string str1, string str2)
if (str1 == str2)
You can’t perform that action at this time.