<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace V5 Site Server v5.13.594-SNAPSHOT-1 (http://www.squarespace.com) on Sun, 15 Nov 2026 00:47:22 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Blog</title><link>http://kevinguyer.squarespace.com/blog/</link><description></description><lastBuildDate>Mon, 13 Aug 2018 12:49:31 +0000</lastBuildDate><copyright></copyright><language>en-US</language><generator>Squarespace V5 Site Server v5.13.594-SNAPSHOT-1 (http://www.squarespace.com)</generator><item><title>Loving Notion.so - and how to tweak menu size</title><category>CSS</category><category>Code</category><category>Tools</category><category>Tools</category><dc:creator>Kevin</dc:creator><pubDate>Fri, 10 Aug 2018 13:37:52 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2018/8/10/loving-notionso-and-how-to-tweak-menu-size.html</link><guid isPermaLink="false">907609:10578291:36098673</guid><description><![CDATA[<p>Huh, I see that it has been a while since I posted.&nbsp; Recently my dev team started using notion.so as a wiki to build out a knowledge base around a new system implemenation, so we have a way to track schema info on tables, what stored procedures do (with links to the managed source), procedures, etc.&nbsp; In short, it is an awesome tool for a team wiki, if it were cheaper we'd likely use it on a much larger scale (hint, consider a lower price to get more adoption...).</p>
<p>If you have not checked it out, you should, I evaluated a number of options, even considered building something, but I really didn't have time to do that.&nbsp; The team is pretty unanimously enamoured with the tool.</p>
<p>&nbsp;<span class="full-image-block ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/Notion-Screenshot.png?__SQUARESPACE_CACHEVERSION=1533909332467" alt="" /></span></span></p>
<p>The only complaint we have had is that the left-most menu bar is a fixed width and it is, for our use, not wide enough to discern some pages.&nbsp; So I use the Chrome browser extension 'Web Override' (at weboverride.com) and use the following CSS to fix the issue.&nbsp; If/as I tweak any further I'll add CSS here:</p>
<pre>.notion-sidebar-container{width:350px !important;}
.notion-sidebar-container &gt; div{width:350px !important;}
.notion-sidebar-container &gt; div &gt; div{width:350px !important;}
.notion-sidebar-container &gt; div &gt; div &gt; div{width:350px !important;}
</pre>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-36098673.xml</wfw:commentRss></item><item><title>Creating a Dynamic Table of Contents for PHPKB</title><category>Code</category><category>JavaScript</category><category>JavaScript</category><category>PHP</category><dc:creator>Kevin</dc:creator><pubDate>Wed, 25 Mar 2015 19:13:16 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2015/3/25/creating-a-dynamic-table-of-contents-for-phpkb.html</link><guid isPermaLink="false">907609:10578291:35283506</guid><description><![CDATA[<p>We use phpkb at work for an internal knowledge base and overall I'm pretty happy with it, it does pretty much everything that I wanted in a KB except for one or two things.  One of those was to allow for a dynamic table of contents based on use of heading tags in your article, something that most wiki software does out of the box, as does MS Word, which is where much of the content we are migrating into phpkb lived before.</p>
<p>So I wrote a little bit of JavaScript to enable a dymanic TOC myself.  It is easy to implement if you are using phpkb, here is how it looks and how to turn this on for article pages.</p>
<p><span class="full-image-block ssNonEditable"><span><img style="border: 1px solid #444;" src="http://kevinguyer.squarespace.com/storage/post-images/phpbk_toc_4.jpg?__SQUARESPACE_CACHEVERSION=1427312132955" alt="" /></span><span class="thumbnail-caption" style="width: 533px;">The TOC is inserted at the top of your article and indented based on heading use</span></span></p>
<p>You can cheat and just get the jscript file and my modded article.php in <a href="http://kevinguyer.squarespace.com/storage/post-images/phpkb_toc.zip">this zipped copy</a>.</p>
<p><strong>Step 1</strong> - Modify article.php (back it up first..)<br /> Paste these lines in that page right before the '$include_files' insertion.<br /><br /> &lt;script type=\"text/javascript\" src=\"$path_kb/thesaurus/js/jquery1-7-1.js\"&gt;&lt;/script&gt;<br /> &lt;script type=\"text/javascript\" src=\"$path_kb/include/toc.js\"&gt;&lt;/script&gt;</p>
<p><span class="full-image-block ssNonEditable"><span><img style="width: 700px;" src="http://kevinguyer.squarespace.com/storage/post-images/phpbk_toc_2.jpg?__SQUARESPACE_CACHEVERSION=1427312058693" alt="" /></span></span></p>
<p><br /> <strong>Step 2</strong> - Create a custom field called 'Show TOC' and make it a non-required checkbox with Yes,No options.</p>
<p><span class="full-image-block ssNonEditable"><span><img style="width: 700px;" src="http://kevinguyer.squarespace.com/storage/post-images/phpbk_toc_3.jpg?__SQUARESPACE_CACHEVERSION=1427312077689" alt="" /></span></span><br /> <strong>Step 3</strong> - Drop the <a href="http://kevinguyer.squarespace.com/storage/post-images/phpkb_toc.zip">toc.js</a> file into the include folder for your installation.  Here is the source for that file so you can see what is going on.</p>
<pre class="brush: javascript">
$(document).ready(function(){
	$('.customfields').find('li').each(function(i) {  // Looks at custom fields on page to see if enabled
		var current = $(this);
		if(current.text() == 'Show TOC: Yes') {  // Enabled, show table of contents		
			$("#ARTICLECONTENT").prepend('&lt;div id="toc"&gt;&lt;b&gt;Table of Contents&lt;/b&gt;&lt;/div&gt;');
			$("#toc").css('border','1px solid #eccf59');
			$("#toc").css('background','#f1eddf');
			$("#toc").css('margin','5px 0 0 0');
			$("#toc").css('padding','5px 5px 15px 5px');
			$("#toc").append("&lt;ul&gt;");
			var iToc = 0; // to track if we find any headings
			$('article').children("h1, h2, h3, h4, h5").each(function(i) {
				iToc ++;
				var current = $(this);
				current.attr("id", "title" + i);
				var sp = '';
				switch(current.prop("tagName")){
					case 'H1': sp = '10px'; break;
					case 'H2': sp = '20px'; break;
					case 'H3': sp = '30px'; break;
					case 'H4': sp = '40px'; break;
					case 'H5': sp = '50px'; break;				
				}
				if(current.html().trim()){
					$("#toc").append("&lt;li style='padding-left:" + sp + ";'&gt;&lt;a id='link" + i + 
						"' href='#title" + i + "' title='" + current.attr("tagName") + 
						"'&gt;" + current.html() + "&lt;/a&gt;&lt;/li&gt;");
				}
			});	
			$("#toc").append("&lt;/ul&gt;");
			if(iToc == 0) { $("#toc").hide(); } // if no content for TOC we just hide it			
		}
	});
});
</pre>
<p>As you can see, with some very little changes you can repurpose this for other applications that use the same 'H tag' heading hierarchy that you commonly run into.</p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-35283506.xml</wfw:commentRss></item><item><title>The Gentleman's Richard - 'The Sophisticated Workplace Dickie'</title><category>Fashion</category><category>Fisticuffs</category><dc:creator>Kevin</dc:creator><pubDate>Tue, 01 Apr 2014 13:01:31 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2014/4/1/the-gentlemans-richard-the-sophisticated-workplace-dickie.html</link><guid isPermaLink="false">907609:10578291:34729673</guid><description><![CDATA[<p><span class="full-image-float-left ssNonEditable"><img src="http://kevinguyer.squarespace.com/storage/post-images/gr/gr_logo_small.png?__SQUARESPACE_CACHEVERSION=1396357422766" alt="" /></span>I'm really excited to finally be able to talk about my first patent and the new business I'm launching today.&nbsp; I've been working in silence for months building a business plan, landing angel investors and cutting up thousands of shirts until I got it right.&nbsp; As of today I quit my job, threw another mortgage on the pile and am pursuing this dream full time.&nbsp; Wish me luck friends!</p>
<p>For years now I've talked about a dickie for the workplace and have finally made my dream a reality.&nbsp; Gone are the days of a binding oxford-style shirt underneath my sweater, the <strong>Gentleman's Richard<span style="font-size: 50%; vertical-align: super;">TM</span></strong> aka <em>'The Sophisticated Workplace Dickie' </em>is here to save the day and set us free.&nbsp; Being in the office now feels like I'm running through the Austrian hills, the world my oyster.&nbsp; Pre-sales to finer men's shops are lining up now, so I have a lot of shirts to butcher.</p>
<p>&nbsp;</p>
<p>Here I am showing my Gentleman's Richard both 'raw' (t-shirt optional if you want to go to work in 'wildling' mode) and with the sweater covering.&nbsp; This setup is accessorized with the 'Faux Cuffs', and stay tuned for the launch of the 'HalfTie - the necktie that you won't have to.'</p>
<p><span class="full-image-inline ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/gr/gr_in_action.png?__SQUARESPACE_CACHEVERSION=1396357563896" alt="" /></span><span class="thumbnail-caption" style="width: 469px;">Business on the outside, party on the inside.</span></span></p>
<p>Look like a professional but be ready for fisticuffs. - The Gentleman's Richard</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/gr/gr_fisticuffs.png?__SQUARESPACE_CACHEVERSION=1396357675747" alt="" /></span><span class="thumbnail-caption" style="width: 471px;">Are you wearing a Gentleman's Richard? - A gentleman never tells...</span></span></p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-34729673.xml</wfw:commentRss></item><item><title>Super-fast Excel to SQL Insert Statement Converter Workbook</title><category>Code</category><category>Excel</category><category>SQL</category><category>Tips</category><category>Tools</category><category>VBA</category><dc:creator>Kevin</dc:creator><pubDate>Mon, 27 Jan 2014 18:12:54 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2014/1/27/super-fast-excel-to-sql-insert-statement-converter-workbook.html</link><guid isPermaLink="false">907609:10578291:34593325</guid><description><![CDATA[<p><span class="full-image-float-left ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/sql_maker0.png?__SQUARESPACE_CACHEVERSION=1390847224247" alt="" /></span></span>Most data comes from our business folks in Excel and needs to be in SQL for us to provide the analysis they are typically after.&nbsp; SQL has some tools to ingest data from Excel into SQL but most of them have proven to be a pain in the butt (data conversions to get unicode and non-unicode columns is at the front of that list).&nbsp; So a few lines of Excel macro and a few sheets to go with those and I have a simple workbook that generates insert statements for you.&nbsp; This has, since I threw it together, saved me a pile of time fiddling with getting data where I need it.&nbsp; It supports options of adding a carriage return between inserts and overriding the default setting to escape quotes if you want.&nbsp; It sends the resulting SQL statements straight to your clipboard.</p>
<p>You can specify how many columns to pick up, starting at the far left, and how many rows to pick up as well.&nbsp; I could have made this sense last used on both axes but, well, didn't.&nbsp; yet.</p>
<p>The file is <a href="http://kevinguyer.squarespace.com/storage/code-samples/SQL_Insert_Statement_Maker.xlsm">available for download</a> and is a macro-enabled Excel workbool (.xlsm) with the following hashes:</p>
<p><strong>MD5</strong> : f94307aeb7140a1f0fbe57d5812859de<br /><strong>SHA-1</strong>: 49b02668774d006b152621895f5cb1ed7aa7bf65</p>
<p>If that still makes you uncomfortable, below is the code and general layout so you can homebrew your own.</p>
<p>Control tab - Where you set your options.&nbsp; If you call these tabs something else just change the Const values in the script.</p>
<p>&nbsp;<span class="full-image-block ssNonEditable"><img src="http://kevinguyer.squarespace.com/storage/post-images/sql_maker1.png?__SQUARESPACE_CACHEVERSION=1390846400023" alt="" /></span></p>
<p>Data tab - Not much to it, it will take the first row values and interpret them as the column names on the insert.</p>
<p><span class="full-image-block ssNonEditable"><img src="http://kevinguyer.squarespace.com/storage/post-images/sql_maker2.png?__SQUARESPACE_CACHEVERSION=1390846427523" alt="" /></span></p>
<p><br />Running the sheet against the data in the image just puts the following in your clipboard:</p>
<p><em style="font-size: 80%;">INSERT INTO some_db.dbo.tblFoo ([last_name],[nickname],[band]) VALUES ('Grohl','Dave','Foo Fighters')<br />INSERT INTO some_db.dbo.tblFoo ([last_name],[nickname],[band]) VALUES ('Walker','Butch','Butch Walker')<br />INSERT INTO some_db.dbo.tblFoo ([last_name],[nickname],[band]) VALUES ('Berg','Moe','TPOH')<br />INSERT INTO some_db.dbo.tblFoo ([last_name],[nickname],[band]) VALUES ('Ellison','Jim','Material Issue')</em></p>
<pre class="brush: vb">Sub GenerateSql()
Const DataTab = "Data"
Const ControlTab = "Control"

Dim szDbName As String, szTableName As String, szLastCol As String, szLastColumn As String, iLastRow As Integer
Dim iColumnCount As Integer, iRowCount As Integer
Dim rCols As Range, rData As Range, szCols As String, szData As String
Dim szSql As String, szSqlRowPreface As String, szSqlRow As String, szSqlCols As String, szSqlDataRow As String
Dim bSettings_ExtraLines As Boolean, bSettings_NoEscape As Boolean

szDbName = Trim(Sheets(ControlTab).Range("C3").Value)
szTableName = Trim(Sheets(ControlTab).Range("C4").Value)
szLastColumn = Trim(Sheets(ControlTab).Range("C6").Value)
iLastRow = Trim(Sheets(ControlTab).Range("C7").Value)
iColumnCount = 0
iRowCount = 0

' Handle settings
    If Sheets(ControlTab).Shapes("Check Box 2").OLEFormat.Object.Value = 1 Then
        bSettings_ExtraLines = True
    Else
        bSettings_ExtraLines = False
    End If
    If Sheets(ControlTab).Shapes("Check Box 3").OLEFormat.Object.Value = 1 Then
        bSettings_NoEscape = True
    Else
        bSettings_NoEscape = False
    End If

' Build ranges
    szCols = "A1:" &amp; szLastColumn &amp; "1"
    szData = "A2:" &amp; szLastColumn &amp; iLastRow
    Set rCols = Sheets(DataTab).Range(szCols)
    Set rData = Sheets(DataTab).Range(szData)

CopyTextToClipboard ("Error, import failed") ' In case we encounter problems

' Build insert, destination and columns:
    For Each col In rCols.Columns
        szSqlCols = szSqlCols + ("[" &amp; col.Value &amp; "],")
        iColumnCount = iColumnCount + 1
    Next col
    szSqlCols = Left(szSqlCols, Len(szSqlCols) - 1) ' remove trailing comma
    szSqlRowPreface = "INSERT INTO " &amp; szDbName &amp; ".dbo." &amp; szTableName &amp; " (" &amp; szSqlCols &amp; ") VALUES ("

' Build values
    For Each rw In rData.Rows
        iRowCount = iRowCount + 1
        szSqlDataRow = "" ' Reset this for each row
        For Each col In rw.Columns
            szSqlDataRow = szSqlDataRow + ("'" &amp; FormatSql(col.Value, bSettings_NoEscape) &amp; "',")
        Next col
        szSqlDataRow = Left(szSqlDataRow, Len(szSqlDataRow) - 1) ' remove trailing comma
        szSql = szSql + szSqlRowPreface &amp; szSqlDataRow &amp; ")" &amp; vbNewLine
        
        If bSettings_ExtraLines = True Then
            szSql = szSql &amp; vbNewLine
        End If
    Next rw

' Add to clipboard and complete:
CopyTextToClipboard (szSql)
MsgBox ("Completed with " &amp; iColumnCount &amp; " data columns and " &amp; iRowCount &amp; " rows." &amp; vbNewLine &amp; vbNewLine &amp; _
    "Results are in the clipboard.")

End Sub

Function CopyTextToClipboard(ByVal inText As String)
  Dim objClipboard As Object
  Set objClipboard = CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
  objClipboard.SetText inText
  objClipboard.PutInClipboard
  Set objClipboard = Nothing
End Function

Function FormatSql(ByVal inText As String, ByVal skip As Boolean)
    If skip = True Then
        FormatSql = Trim(inText)
    Else
        FormatSql = Trim(Replace(inText, "'", "''"))
    End If
End Function
</pre>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-34593325.xml</wfw:commentRss></item><item><title>HabitRPG - The Gamefication of My Todo List</title><category>Productiviry</category><category>Rants</category><category>Tips</category><dc:creator>Kevin</dc:creator><pubDate>Thu, 23 Jan 2014 18:30:56 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2014/1/23/habitrpg-the-gamefication-of-my-todo-list.html</link><guid isPermaLink="false">907609:10578291:34585966</guid><description><![CDATA[<p><span class="full-image-float-left ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/habitrpg_bosk.png?__SQUARESPACE_CACHEVERSION=1390502523052" alt="" /></span></span>I have a rotten memory and a job that often has me managing far too many tasks every day than I can keep straight in my head.&nbsp; Over the years I've developed habits to help mitigate this, I methodically store detailed notes in my wiki and use task trackers.&nbsp; I've gone through more task trackers over the years than I can really remember, some good, some not good, but the one that I've been using for the last year is my favorite to date.&nbsp; The fact that I've been using it for a year says a lot about this tool.</p>
<p>It's called <a href="http://habitrpg.com">HabitRPG</a> and they describe the (free) site/service thusly: 'HabitRPG is an open source habit building program which treats your life like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor'.</p>
<p>Gear, mounts, pets, classes, spells, potions, parties, guilds, quests, boss fights.&nbsp; I.&nbsp; Freaking.&nbsp; Love.&nbsp; It.&nbsp;</p>
<p>I have habits that I track, good and bad, things I should do daily and my running todo list.&nbsp; When I do things I should, I gain gold and experience which lead to better gear, helpful when I don't do what I should.&nbsp; Missing items or engaging in behavior I am trying to curb (such as beer on a weekday) makes me take damage.&nbsp; That happens enough and I die, losing gold and precious gear.&nbsp; I know, it all sounds ridiculous, but it works, I've stayed engaged with this todo list far more than any before it and have a free, yet real additional incentive to get things done.</p>
<p>I've recently joined a party, where we take on 'boss monsters' as a group.&nbsp; What this really means is that my achieving my daily goals (or not) helps or hurts the group.&nbsp; That adds support among this group of (previously) strangers and additional incentive.&nbsp; You can aslo accept 'quests' created by the community, accepting the challenge to adopt a good habit for a period, and gaining loot if successful. All of these boosts to getting things done are tiny, but are boosts.</p>
<p>HabitRPG was a brilliant idea by Tyler Renelle that I funded on Kickstarter in its infancy and has evolved into a awesome, fun and effective tool for me to stay on target.&nbsp; Give it a spin and drop me a note if you want to join the party, we could use a mage that does their work on time...</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/habitrpg_dashboard.jpg?__SQUARESPACE_CACHEVERSION=1390502574191" alt="" /></span><span class="thumbnail-caption" style="width: 700px;">My dashboard and party</span></span></p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-34585966.xml</wfw:commentRss></item><item><title>Resource for SharePoint farm upgrade with server name change</title><category>Code</category><category>JavaScript</category><category>Node.js</category><category>SharePoint</category><dc:creator>Kevin</dc:creator><pubDate>Mon, 16 Dec 2013 14:54:59 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2013/12/16/resource-for-sharepoint-farm-upgrade-with-server-name-change.html</link><guid isPermaLink="false">907609:10578291:34509309</guid><description><![CDATA[<div id="_mcePaste"><span class="full-image-float-left ssNonEditable"><span><img src="http://kevinguyer.squarespace.com/storage/post-images/node.js_logo.png?__SQUARESPACE_CACHEVERSION=1387205878654" alt="" /></span></span>This was a question I had someone ask last week regarding how you might handle the situation where you want to change the host name of your SharePoint farm in an upgrade (or just the host name for any web app really) knowing that all embedded links will be broken.</div>
<p>&nbsp;</p>
<div id="_mcePaste">The low hanging fruit is to set a DNS record so that the old and new point to your new server address, but if you want to alter some site names and/or alert users that they have an old, deprecated url instead of just forwarding them on, the solution below might work for you.</div>
<p>&nbsp;</p>
<div id="_mcePaste">The following script is for the node.js platform and, if run on a server with your old host name's resolution, will intercept incoming http requests, map it to your new server, allowing for site renaming and provide the user with a message as well as the new 'best guess' url to what they were trying to reach. &nbsp;It is pretty straightforward and should be relatively easy to modify as needed.</div>
<p>&nbsp;</p>
<div id="_mcePaste">HTTPS (443): This is geared toward standard HTTP traffic, if you need a version to work with HTTPS on port 443, you can find some subtle changes that will be needed in the node.js information here <a href="http://nodejs.org/api/https.html">http://nodejs.org/api/https.html</a>.</div>
<p>&nbsp;</p>
<pre class="brush: javascript">
// Kevin Guyer - 2013
// Node.js script to handle server (SharePoint) name changes
//  This is designed to catch the use of old urls and present an infomational page with the new url to the resource
//  Test with this to see URL altering:  http://localhost:8080/hr/foosite/barsite/somelibrary/somedoc.pdf

// Intercept incoming port 80 or 443 (needs to operate on both) - set the port below for flavor you are running
var http = require('http');
var url = require("url");
var server = http.createServer();

server.on('request', function(request, response) {
	var hostname = request.headers.host;
    var newHostname = 'https://yournewfarmpath';  // no trailing slash, set to your new farm/server name and path
    var pathname = url.parse(request.url).pathname;
    var newPathname = pathname;
    var query = url.parse(request.url).query;  // optional, not used yet
	
    // Run match logic on array elements to determine what needs to be displayed
    var aResPath = pathname.split('/');
    
    // Modify path elements as needed with element matching:
    var wasAltered = false;
	if(aResPath.length &gt;=1){
		try{
			if(aResPath[1].toLowerCase() == 'hr'){ aResPath[1] = 'HumanResources'; wasAltered = true; }
			if(aResPath[3].toLowerCase() == 'barsite'){ aResPath[3] = 'NewBarSite'; wasAltered = true; }
			// add others as needed, sites on root starting at index [1]...
		} 
		catch(err) {
			// handle as desired...
		}
		
		if(wasAltered == true){
			console.log("Detected swap string in path, altering output.");
			newPathname = '';
			for(i = 1; i &lt; aResPath.length; i++){
				newPathname = newPathname + '/' + aResPath[i];
			}
		}
	}
    // Build response message
    var payload = '&lt;h2&gt;Oops.&lt;/h2&gt;&lt;p&gt;The url you attempted to reach (&lt;em&gt;' + hostname +  pathname + '&lt;/em&gt;) is no longer valid.&lt;/p&gt;';
    // Optional: Build and supply a best bet url    
    payload += '&lt;p&gt;Our best guess for the new url for this resource is &lt;a href="'+ newHostname + newPathname+'"&gt;'+ newHostname + newPathname+'&lt;/a&gt;.&lt;/p&gt;';
    payload += '&lt;p&gt;Please update your favorite or link source to reflect this new address.&lt;/p&gt;';

    // Optional step to log the old url hit via a web API (REST) - todo...

    // Build and deliver response    
    response.writeHead(200, {"Content-Type": "text/html"});
    response.write(payload);
    response.end();
});

var port = 8080;  // change this to 80 or 443 as needed
server.listen(port);
server.once('listening', function() {
    console.log('Redirect server is now listening on port %d', port);
});
</pre>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-34509309.xml</wfw:commentRss></item><item><title>Banner with Quick Access to Search a SP2010 List</title><category>Code</category><category>JQuery</category><category>JavaScript</category><category>SPServices</category><category>SharePoint</category><category>SharePoint Saturday</category><category>sSharePoint</category><dc:creator>Kevin</dc:creator><pubDate>Mon, 24 Jun 2013 17:50:09 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2013/6/24/banner-with-quick-access-to-search-a-sp2010-list.html</link><guid isPermaLink="false">907609:10578291:33936097</guid><description><![CDATA[<p>This is a quick piece of script and HTML that I threw together to help make it easier for our users to search a list or library in SharePoint when they were on a view page.  Once added to your environment you can add this to the top of any view and it will both display the name of the list in the banner and dynamically set itself up to search the list/library that the hosting view lives on.</p>

<img src="http://kevinguyer.squarespace.com/storage/sps_2013/14_SearchBanner_SS.png" />

<p>There is a search control included in SharePoint but this saved a few steps (clicks) we thought might be critical in getting people to use search more often and it makes for a nice custom banner to boot.  With a little tweaking you can further change the banner text, the control's watermark and the banner image.  With a few small changes this could also have the scope set to the site instead of a list.</p>

<p>All of the code, images and documentation for deployment is in the accompanying .zip file.  Let me know in the comments if you have further suggestions.<br><br>

<a href="http://kevinguyer.squarespace.com/storage/sps_2013/14_ListSearchHeader.zip" style="
 text-decoration:none; 
 text-align:center; 
 padding:11px 8px; 
 border:solid 1px #000000; 
 -webkit-border-radius:4px;
 -moz-border-radius:4px; 
 border-radius: 4px; 
 font:10px Arial, Helvetica, sans-serif; 
 font-weight:bold; 
 color:#ffffff; 
 background-color:#929494; 
 background-image: -moz-linear-gradient(top, #929494 0%, #000000 100%); 
 background-image: -webkit-linear-gradient(top, #929494 0%, #000000 100%); 
 background-image: -o-linear-gradient(top, #929494 0%, #000000 100%); 
 background-image: -ms-linear-gradient(top, #929494 0% ,#000000 100%); 
 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=0 ); 
 background-image: linear-gradient(top, #929494 0% ,#000000 100%);   
 -webkit-box-shadow:2px 2px 2px #bababa, inset 0px 0px 1px #ffffff; 
 -moz-box-shadow: 2px 2px 2px #bababa,  inset 0px 0px 1px #ffffff;  
 box-shadow:2px 2px 2px #bababa, inset 0px 0px 1px #ffffff;"/>DOWNLOAD SEARCH BANNER</a>

<br><br>

//Kevin</p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-33936097.xml</wfw:commentRss></item><item><title>Metro-Style Easy Tabs for SharePoint 2010</title><category>Code</category><category>JQuery</category><category>JavaScript</category><category>SPServices</category><category>SharePoint</category><category>SharePoint</category><category>SharePoint Saturday</category><dc:creator>Kevin</dc:creator><pubDate>Wed, 03 Apr 2013 20:16:03 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2013/4/3/metro-style-easy-tabs-for-sharepoint-2010-1.html</link><guid isPermaLink="false">907609:10578291:33219636</guid><description><![CDATA[<p>This is an item I flashed a development iteration of to the group in my Richmond SharePoint Saturday presentation and have since cooked up what is called 'V2' of the effort but is really the first version that I've made available.  This approach just simplifies the initial version by making the tile's images all the same, though I did add a dynamic element to the colors.  I'm not yet sure if that is a good idea, so I have instructions below to turn that off if you'd like.  This is all based on the brilliant client-side Easy Tabs script that I just modified and simplified for the new visual style.</p>
<p><img src="http://kevinguyer.squarespace.com/storage/sps_2013/4_MetroTabsV2_SS.png" alt="" /></p>
<p>You can deploy these as you would 'normal' Easy Tabs for SP, my instructions for using the original script are <a href="http://kevinguyer.squarespace.com/storage/sps_2013/3_Tabs.zip">here</a> though you'll want the new code as it is not in that package:<br /><br /> <a href="http://kevinguyer.squarespace.com/storage/sps_2013/4_MetroTabsV2.zip"><img style="border-style: none;" src="http://kevinguyer.squarespace.com/storage/sps_2013/4_btn_DL_MetroTabs-V2.png" alt="" /></a></p>
<p>Want to kill the random tile colors?  Yeah, can't say I blame you...</p>
<p style="padding-left: 30px;">Edit line #108 in the file from this:</p>
<p style="padding-left: 60px;"><em>var colorNumber = 1 + Math.floor(Math.random() * 9);  // random start 1-9 </em></p>
<p style="padding-left: 30px;">to this (where the '1' can be any number from 1 to 9) :</p>
<p style="padding-left: 60px;"><em>var colorNumber = 1;</em></p>
<p><br /> I may make more versions of this, including one allowing for a single color for the tiles. &nbsp;Let me know if there is a feature that you might like that I should consider. &nbsp;I'm not sure yet how to reliably incorporate custom images per tab (that make sense to the tab's context) without the end user editing the script and violating the plug and play goal here.</p>
<p>This version looks like the above screenshot with both a hover effect and a visualization for selected items. &nbsp;Over-n-out.</p>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-33219636.xml</wfw:commentRss></item><item><title>The Cheapskate's Guide: Extending SP 2010 Functionality</title><category>Code</category><category>JavaScript</category><category>SharePoint</category><category>SharePoint</category><category>SharePoint Saturday</category><category>Tips</category><dc:creator>Kevin</dc:creator><pubDate>Sat, 23 Mar 2013 14:02:00 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2013/3/23/the-cheapskates-guide-extending-sp-2010-functionality.html</link><guid isPermaLink="false">907609:10578291:33100601</guid><description><![CDATA[<p><span class="full-image-float-left ssNonEditable"><span><img style="width: 150px;" src="http://kevinguyer.squarespace.com/storage/sps_2013/2013_Thumb.png?__SQUARESPACE_CACHEVERSION=1364047421405" alt="" /></span></span>This is what I am presenting at SharePoint Saturday in Richmond VA and the accompanying file packages that go with that talk.  There are 13 items total, each of them containing any scripts and resources needed (that I can provide) and a PDF breakdown of what it takes to deploy them.  5 of the 13 use Javascript controls I picked up for cheap from <a href="Codecanyon.net">Codecanyon.net</a>, you'll need to grab the control mentioned to get these to work, the others contain all that you need to get running.  Drop me a line if you do something cool with one of these or modify them.</p>
<p>&nbsp;</p>

<table>
	<tr>
		<td style='vertical-align:top;'>
			<img src="http://kevinguyer.squarespace.com/storage/sps_2013/2013_splashslide.png" style='padding-bottom:10px;' />
			<br>
			<img src="http://kevinguyer.squarespace.com/storage/sps_2013/2013_splashslide_2.png" />
		</td>
		<td style='vertical-align:top;'>
			<h1 style='border-bottom:1px solid black;'>The Slides:</h1>
			<ul>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/Presentation_v.web.pptx">PowerPoint</a></li>
			</ul>
			<h1 style='border-bottom:1px solid black;'>The Controls:</h1>
			<ol>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/1_CalendarViewer.zip">Calendar Viewer (free)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/2_FoobarAlerts.zip">Foobar Alerts - $2 Coffees (foobar 2.1)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/3_Tabs.zip">Tabs &ndash; Original (free)</a></li>
				<li>Tabs &ndash; Metro (free) (Edit:<a href='http://kevinguyer.squarespace.com/blog/2013/4/3/metro-style-easy-tabs-for-sharepoint-2010-1.html'>Published here!</a>)</li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/5_PageRotator.zip">News Page Rotator - $4 Coffees (Royal Slider 9.4.8)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/6_FAQs.zip">FAQ (free)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/7_TabbedContainer.zip">Tabbed Container - $4 Coffees (Zozo Tabs v2.2)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/8_IWantTo.zip">I Want To (free)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/9_ImageRotator.zip">Image Rotator - $3 Coffees (jQuery Banner Rotator)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/10_GoogleRssFeeds.zip">Google RSS Static (free)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/11_GoogleRssFeeds.zip">Google RSS Scrolling (free)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/12_Snow.zip">Snow - $1 Coffee (JSized Snow Effect)</a></li>
				<li><a href="http://kevinguyer.squarespace.com/storage/sps_2013/13_TrafficMap.zip">Google maps traffic widget (free)</a></li>
			</ol>
			<h1 style='border-bottom:1px solid black;'>Other links of note:</h1>
			<ul>
				<li><a href="http://notepad-plus-plus.org/">Notepad++ - Great editor</a></li>
				<li><a href="http://codecanyon.net/">CodeCanyon (where I shop for controls)</a></li>
				<li><a href="http://jquery.com/">jQuery</a></li>
				<li><a href="http://spservices.codeplex.com/">SP Services</a></li>
				<li><a href="http://www.codeproject.com/Articles/458008/CAML-Query-Builder">CAML Query Builder</a></li>
			</ul>		
		</td>
	</tr>
</table>]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-33100601.xml</wfw:commentRss></item><item><title>Outlook-Fu: How to 'Snooze' Email in Your Inbox</title><category>Outlook</category><category>Rambling</category><category>Tips</category><category>Tips</category><dc:creator>Kevin</dc:creator><pubDate>Mon, 11 Mar 2013 16:48:57 +0000</pubDate><link>http://kevinguyer.squarespace.com/blog/2013/3/11/outlook-fu-how-to-snooze-email-in-your-inbox.html</link><guid isPermaLink="false">907609:10578291:32957291</guid><description><![CDATA[<p>If you are like most people today (including me), your inbox doubles as your to-do list and is the roadmap for what you need to take care of each day.  We know that it is not ideal, but is what the majority of us use, because it is there and contains our action items already.  Below are instructions for setting up a way to 'snooze' email messages so, much like you do with appointments that pop up in the Outlook reminder, you can hide them from view until they need attention.  I find that the lack of clutter created by things I don't need to address yet keeps my inbox streamlined and easier to manage.</p>

<p>To do this we'll be creating a new view of our inbox and setting a filter.  Instructions and screenshots are shown in Outlook 2013 but the same options discussed are available with Outlook 2010 as well.</p>

<h2>Step 1 – Create a new view</h2>
<ol>
<li>Navigate to your inbox</li>
<li>In your 'view' tab, under 'Change View', choose 'Save Current View as New View', give this view a name and allow it to be used on All Mail and Post folders <br/> <img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_001.png" /></li>
<li>Now you have a duplicate view and can hop back between this and your original view at will via the 'View' -> 'Change View' option.
</ol>

<h2>Step 2 – Configure a Filter</h2>
We want the new view to only show items that both have no Due Date (otherwise we don't see any new items) and those that have a due date of today or before.  To do this you:
<ol>
<li>Open 'View Settings' in your View menu<br/> <img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_002.png" /></li>
<li>In the Advanced View Settings dialog, choose 'Filter'<br/> <img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_003.png" /></li>
<li>In the 'Advanced' tab, add an item for 'Due Date', you'll find that under 'Frequently-used Items' and set it's condition to 'does not exist'.  Then add this rule to the list.<br/> <img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_004.png" /></li>
<li>Repeat the previous step, adding another Due Date filter but with the condition of 'on or before' and in the 'Value' field type Today and add the rule to the list.  You will have the following 2 rules showing now.  Click OK both here and in the Advanced View Settings to return to your new view.  You are done.<br/> <img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_005.png" /></li>
</ol>

<h2>Using your new View and Powers of Snooze</h2>
Now, when you right-click the flag icon beside a message in your inbox you are shown the due date flag options that look like this:<br/>
<img src="http://kevinguyer.squarespace.com/storage/post-images/outlook-fu/Outlook-fu_1_006.png" />
<br/> 
When you open these flag options for a message and set the due date flag to one of the dates in the future, say tomorrow, it will now disappear from the view of your inbox until tomorrow.  Out of sight, out of mind.  Note that setting an item to 'This Week' will set the reappear/due date to the upcoming Friday and 'Next Week' will set it to the following Monday.  You can choose 'Custom' to set any specific date you want to have it reappear as well, even telling Outlook to throw a reminder if you like.<br/><br/>
Items that you set to a future date will now hide until you want them to reappear, though you can always shift to your original view (which is why we made a copy of that view to begin with) in order to see all items in case you need to get to a message before it's due date.]]></description><wfw:commentRss>http://kevinguyer.squarespace.com/blog/rss-comments-entry-32957291.xml</wfw:commentRss></item></channel></rss>