Friday, June 7, 2013

App of the Week #10: center.exe


App of the Week #10

center

A simple DOS/CLI utility that centers the current command prompt window. It is very similar to shrink and enlarge.

Check out the source code on GitHub!

Wednesday, May 22, 2013

jQuery.deepShow()

I wrote this little snippet earlier today that ensures an object is shown even if one of its parent objects is currently being hidden. It does this, of course, by going through its parents and checking for the 'display:none' property..

/// <summary>
/// Shows the object and clears any style="display:none;" /// styles on all of its parents. /// </summary> jQuery.fn.deepShow = function() { $(this).parents().each(function() { if ($(this).css("display") === "none") { $(this).css("display", ""); } }); $(this).show(); }

Monday, March 11, 2013

Your organization's policies...

"Your organization's policies are preventing us from completing this action for you. For more info, please contact your help desk."

I have been getting this error every time I click on a hyperlink in an Outlook 2013 email. It has been very frustrating.

The problem was solved by resetting the HKEY_CLASSES_ROOT\.html String (Default) value to 'htmlfile'. Apparently, this was happening frequently when un-installing Google Chrome. However, on my machine it appears that Notepad++ changed the key!? I made the fix, restarted Outlook, and it works now!


I found the solution here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;310049&wa=wsignin1.0

Here are the steps (from the link above):

Verify that the String (Default) value of the "HKEY_CLASSES_ROOT \.html" key is "htmlfile"
  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. Locate, and then click the following registry subkey:
    HKEY_CLASSES_ROOT \.html
  4. Make sure that the value of the String (Default) is "htmlfile". If it's not "htmlfile", right-click (Default), click Modify, input htmlfile in the Value data box, and then click OK.
  5. Exit Registry Editor.


Saturday, March 9, 2013

App of the Week #9: GitVersion.MSBuild.dll

App of the Week #9

GitVersion

GitVersion.dll is a basic MSBuild extension for versioning assemblies, based on the Git revision count. See the source code for more details about that.

The Git.exe binary is required for this to work. And, the MSBuild Community Tasks is also required for some of this to work.

In order to use this extension, add the following to your .csproj files and reload your project:

<PropertyGroup Label="Versioning">
  <VersioningMajor>0</VersioningMajor>
  <VersioningMinor>9</VersioningMinor>
  <CommitVersion>N/A</CommitVersion>
</PropertyGroup>
<PropertyGroup>
  <GitBinPath>C:\YourPath\Git\bin</GitBinPath>
</PropertyGroup>
<UsingTask TaskName="GitVersion" AssemblyFile="C:\YourPath\GitVersion.dll" />
<Target Name="BeforeBuild">
  <GitVersion GitBinPath="$(GitBinPath)" CurrentPath="$(MSBuildProjectDirectory)">
    <Output TaskParameter="CommitVersion" PropertyName="CommitVersion" />
    <Output TaskParameter="CommitCount" PropertyName="CommitCount" />
  </GitVersion>
  <Time Format="yyMMdd">
    <Output TaskParameter="FormattedTime" PropertyName="BuildDate" />
    <Output TaskParameter="Year" PropertyName="Year" />
  </Time>
  <AssemblyInfo 
    CodeLanguage="CS" 
    OutputFile="Properties\AssemblyInfo.cs" 
    AssemblyTitle="appName ver:$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" 
    AssemblyDescription="appName" 
    AssemblyCompany="Company Name" 
    AssemblyProduct="appName" 
    AssemblyCopyright="Copyright (C) 2003-$(Year) Author's Name." 
    ComVisible="false" 
    CLSCompliant="false" 
    Guid="11111111-2222-3333-4444-555555555555" 
    AssemblyVersion="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" 
    AssemblyFileVersion="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" />
  <Message Text="$(VersioningMajor).$(VersioningMinor).$(BuildDate.Substring(1)).$(CommitCount)" />
</Target>

Please note that this will overwrite your AssemblyInfo.cs file!

Check out the source code on GitHub!

App of the Week #8: enlarge


App of the Week #8

enlarge

A simple DOS command-line (CLI) utility that enlarges the command prompt window to the largest possible size (based on the current/active screen). Just like shrink, this is a super simple utility and hardly any code, but I use it frequently every day!

Check out the source code on GitHub!

App of the Week #7: shrink


App of the Week #7

shrink

A simple DOS command-line (CLI) utility that shrinks the current command prompt window to 80x24. And, that's all it does! It is a super simple utility and hardly any code, but I'm always surprised just how often I use it!

I checked it into GitHub a while back, but forgot to make the entry into my blog.. oh well. Here it is now.

Check out the source code on GitHub!

App of the Week #5: ebook_compiler


App of the Week #5

ebook_compiler

This is a simple utility that converts .md (markdown) files to html. It then combines them into one ebook .html file.

The real benefit of this is that I can separate my book into separate files. As many or as few as I want. I currently have split up my little book into chapters and sub-sections; one file each.

This little utility will only convert md files that have changed, into html. Once all html files are up to date, they are combined into a single file and wrapped inside the template.

It supports a config (ebookconfig.txt) and a template (ebooktemplate.txt) file.

_ebook_config.txt:
   title=My book title
   ext=*.md

The template file is really just an html file. Use @SPLIT@ to indicate in the template where the book contents will be. See the examples folder in the code for details.

This is not a markdown to html compiler.
It relies upon markdown.pl (a Perl script) available from daring fireball for the actual conversion.

Check out the source code on GitHub!

It is definitely a work in progress, but it does what I need for the book I'm working on. And, it is 100 times faster than editing a single md file and converting the whole thing every time.