Creating Expandable Syntax Code Containers – SyntaxHighlighter Evolved

One of my pet peeves with sites that share code is that often snippets will be hard to copy, taking in markup or line numbers, or the fact that it’s just too hard to read on the website due to sizing. For this blog I have been using SyntaxHighlighter Evolved which works well. My only issue was when I switched to a thinner design it hurt readability of code when...

Export Any SharePoint WebPart In a Click With This Bookmarklet or JavaScript

Take a peek, see that little Export Me in the above picture? I just had to click my bookmarklet to produce this link which allows for a direct export of any visible web part. This uses a trick I found on CHUVASH.eu which highlights that there’s a special ‘exportwp.aspx’ page within SharePoint that when handed the webpart GUID and page url will provide the export XML download. Neat? Neat. Bookmarklet...

Quick Tip: HP Deskjet F4400 Out of Paper

A quick tip for anyone still sporting the F4400 Deskjet printer from HP. A common problem I see online, as well have experienced in the past has been an ‘Out of Paper’ issue. There are no indicators on the printer when this happened, it was only when I looked at Windows Printers and seen the error message. Just about every post online refers to the basic HP troubleshooting guide for...

SharePoint: Display All Property Bag Values From your Browser

Trying to take my Sunday a bit easy but why not just put in a bit effort to make others lives a bit easier?! If you need to see some JSOM in action for reading property bag values, or just want to see what those darn values are heres a quick script to run in your browser developer console. Outputs all property bag values from the current SharePoint web. Keep...

Understanding SharePoint and Script On Demand (SOD)

One principal which always had a shroud over it for to long with me was SharePoint’s SP.SOD functionality. The MSDN isn’t all to helpful, but it still serves as a starting point for where to find the SOD methods. I thought I’d take a step back tonight and play with the system and document how to use this system effectively as well as understanding both sides of the equation when...

PowerShell and Project Euler 22: Names scores

Continuing from the last Project Euler post I worked on the Names scores quiz in PowerShell. The problem being: Using names.txt (right click and ‘Save Link/Target As…’), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. For example, when...

PowerShell and Project Euler 23: Find the sum of all the positive integers which cannot be written as the sum of two abundant numbers

A fair chunk of my work involves PowerShell Scripting and as a means to expand my general programing knowledge as well as my PowerShell abilities I had taken on the Project Euler question #23. It states: A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 +...

Recursive PowerShell Binary Search Algorithm

I’ve been trying to solve a problem where I have a huge list of numbers within an array and I wanted to ensure that a number was present in this array. With arrays you have the option to use the Contains function but with huge arrays it may be much more efficient to check using a binary search. During a quick search to see if I could leverage someone else’s...

SharePoint’s Script Application Manager Tracing Output

I had some free time to dig around in code to see how some internals of SharePoint CSWP’s worked. One thing that I’ve always noticed but never looked into was the fact that when editing a SharePoint page there was often debugger output in the browsers debugger console. Microsoft put a routine in their code to check if the browser supports a debugger output option. For example, I do believe...