Skip to content

Instantly share code, notes, and snippets.

View freshcutdevelopment's full-sized avatar

Sean Hunter freshcutdevelopment

View GitHub Profile
@freshcutdevelopment
freshcutdevelopment / web.xml
Last active May 8, 2022 14:05
Web.config for single page application push state in IIS (credit to Matt McCabe)
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<remove name="pushState" />
<rule name="pushState" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<template>
<h1>${greeting}</h1>
</template>
@freshcutdevelopment
freshcutdevelopment / todo.json
Created December 27, 2015 13:38
Sample todo json file
{
"items":[
{
"id" : 1,
"text": "Learn about Polymer",
"created_at": "Mon Apr 26 06:01:55 +0000 2015",
"Tags": [
"Web Development",
"Web Components"
],
@freshcutdevelopment
freshcutdevelopment / app.html
Last active January 11, 2020 10:08
Aurelia Gist - Dynamic composition (complete)
<template>
<require from="./au-form"></require>
<link rel="stylesheet" type="text/css" href="style.css">
<h1>${message}</h1>
<hr/>
<compose view="info-card.html"></compose>
<hr/>
<div class="container">
<au-form></au-form>
</div>
@freshcutdevelopment
freshcutdevelopment / app.html
Last active December 19, 2019 06:58
Aurelia Gist - Creating a templated list
<template>
<require from="style.css"></require>
<require from="list-group"></require>
<require from="pokemon.html"></require>
<section>
<h1>${message}</h1>
<hr/>
<h3>custom template</h3>
@freshcutdevelopment
freshcutdevelopment / tooltip.js
Last active July 3, 2019 05:19
tooltip example custom attribute
import {customAttribute, inject, bindable} from 'aurelia-framework';
import $ from 'bootstrap';
@customAttribute('tooltip')
@inject(Element)
export class Tooltip {
element: HTMLElement;
@bindable title: any;
@bindable placement: any;
@freshcutdevelopment
freshcutdevelopment / app.html
Last active February 19, 2019 15:36
Aurelia in Action Chapter 2 - Exercise 2.2
<template>
<h1>${message}</h1>
<form submit.trigger="greet()">
<input type="text" value.bind="greeting"></input>
<input type="submit" value="greet"></input>
</form>
</template>
@freshcutdevelopment
freshcutdevelopment / app.html
Last active December 7, 2018 05:24
Aurelia in Action Chapter 2 - Exercise 2.1
<template>
<h1>${message}</h1>
<form>
<input type="text"></input>
<input type="submit"></input>
</form>
</template>
@freshcutdevelopment
freshcutdevelopment / app.html
Last active November 21, 2018 18:46
Aurelia Gist - Add book form
<template>
<require from="book-form"></require>
<book-form></book-form>
<div class="notification" show.bind="notification.length > 0">
${notification}
</div>
</template>
@freshcutdevelopment
freshcutdevelopment / TiffCombiner.cs
Created October 9, 2018 02:36
Utility to combine multiple TIFFs into a single multi-page TIFF
public class ImageUtilities
{
//refrence https://stackoverflow.com/questions/398388/convert-bitmaps-to-one-multipage-tiff-image-in-net-2-0
private const string Encoder = "image/tiff";
public static Image CombineFiles(string[] inputFiles, string output)
{
Image multiPageFile = null;