Skip to content

Instantly share code, notes, and snippets.

View paulblamire's full-sized avatar

Paul Blamire paulblamire

View GitHub Profile
@paulblamire
paulblamire / index.html
Created March 23, 2017 08:50 — forked from alexandrevicenzi/index.html
Bootstrap CSS Animate Loading Icon Button
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
function downloadFile($dir, $fileName, $url)
{
$dirExists = Test-Path $dir
$fullFile = ($dir+"\"+$fileName)
if (-Not $dirExists)
{
@paulblamire
paulblamire / DictionaryExtensions
Created February 20, 2014 21:12
Dictionary Extensions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Everhaven.Utility
{
internal static class DictionaryExtensions
{
public static V GetOrNull<K, V>(this Dictionary<K, V> dictionary, K key)
@paulblamire
paulblamire / BootstrapHelper.Usage
Last active December 26, 2015 22:39
BootstrapHelper example usage
@using (Html.BeginForm())
{
using (Html.BeginFields())
{
<h4>Model Heading</h4>
<hr />
@Html.ValidationSummary(true)
@Html.Field(m => m.FirstName, @<text>@Html.EditorFor(item) @Html.ValidationMessageFor(item)</text>)
@paulblamire
paulblamire / BootstrapHelper
Created October 29, 2013 22:58
Helper to reduce the amount of Bootstrap 3.0 chrome that needs to be manual written around standard HtmlHelper extensions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
using System.Linq.Expressions;
using System.Web.Mvc.Html;
using System.Text;