Loading Gists Asynchronously
01 May 2014

gist github javascript asynchronous


Gist is a service offered by GitHub that provides a simple way to share code snippets and examples. One of the features offered is the ability to embed your code snippets, or Gists, on a web page. This is achieved by adding a script tag to the web page html that displays and styles the code snippet e.g. gist:9951580 The main flaw with this implementation is that the Gist content is not loaded asynchronously. So if the GitHub web site is taking a long time to respond your html content will not render until a response is returned. Writing a development blog I find that my blog posts can someti…

Read More

Creating a NuGet package
27 Mar 2014

nuget c# .net guard


Download NuGet Download the NuGet command line utility. http://nuget.codeplex.com/releases Once downloaded place the executable (NuGet.exe) in an easily assessable location e.g. C:\NuGet\NuGet.exe Add the location to your system path in order to make the NuGet.exe globally accessible from the command line. It’s not strictly necessary but will save you having to type the full path of the exe every time you want to use it from the command line. You can find out how to add a location to your computer's system path here: http://answers.yahoo.com/question/index?qid=20090723044645AAG0QrI Create …

Read More

Reading Settings from App Config
10 Feb 2014

.net c# configuration dictionaryadapter


The ability to change the behaviour and configuration of your application without making functional code changes is very important. One of the most common ways of achieving this is to place configurable values and settings into your project’s app.config file. gist:8897602 The aim of the game is to make use of these settings throughout your application. These settings may be of varying types: strings, integers or dates. In order to make these accessible you will need to read these settings from the project’s app.config file and parse the values where necessary. So, for example, you would expec…

Read More

Creating a Centralized NuGet Packages Folder
12 May 2012

msbuild nuget visual studio 2010


I would imagine most people by now will have discovered and use the NuGet Visual Studio extension (http://www.nuget.org). It is a great way of adding and maintaining 3rd party code libraries in your projects. One problem I find though is that every time I create a new project or solution I end up installing the same old NuGet packages. By default NuGet downloads the source code for these packages into a new "packages" folder in your project/solution root directory. This means I have the same source code downloaded multiple times, in multiple locations. This can easily be fixed as you can conf…

Read More

Style Selected Text with CSS3
16 Jan 2012

css css3 html selection


Loving some of the new things you can now do with CSS3. Recently discovered that you can add styling to text selected by the user. Begs the question where you could make use of this or in fact whether a user is ever likely to notice you have tweaked the styling for their benefit but hey... Style Selected Text Style Selected Text Simply drag the cursor over the styled text and the background and color properties change. gist:5272605 This is now supported in the latest versions of all the major browsers: Internet Explorer, Opera, Firefox and Chrome.

Read More