Skip to content

Instantly share code, notes, and snippets.

Sean Hunter freshcutdevelopment

Block or report user

Report or block freshcutdevelopment

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@freshcutdevelopment
freshcutdevelopment / web.xml
Last active Jan 15, 2020
Web.config for single page application push state in IIS (credit to Matt McCabe)
View web.xml
<?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" />
@freshcutdevelopment
freshcutdevelopment / app.html
Last active Jan 11, 2020
Aurelia Gist - Dynamic composition (complete)
View app.html
<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 Dec 19, 2019
Aurelia Gist - Creating a templated list
View app.html
<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>
View greeter.html
<template>
<h1>${greeting}</h1>
</template>
@freshcutdevelopment
freshcutdevelopment / tooltip.js
Last active Jul 3, 2019
tooltip example custom attribute
View tooltip.js
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 Feb 19, 2019
Aurelia in Action Chapter 2 - Exercise 2.2
View app.html
<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 Dec 7, 2018
Aurelia in Action Chapter 2 - Exercise 2.1
View app.html
<template>
<h1>${message}</h1>
<form>
<input type="text"></input>
<input type="submit"></input>
</form>
</template>
@freshcutdevelopment
freshcutdevelopment / app.html
Last active Nov 21, 2018
Aurelia Gist - Add book form
View app.html
<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 Oct 9, 2018
Utility to combine multiple TIFFs into a single multi-page TIFF
View TiffCombiner.cs
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;
@freshcutdevelopment
freshcutdevelopment / app.html
Last active Mar 3, 2018
Adding Bootstrap 4 to an Aurelia CLI Project
View app.html
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from="styles.css"></require>
<div class="container">
<div class="header clearfix">
<h3 class="text-muted"><span class="brand-highlight">my </span> books</h3>
</div>
<router-view></router-view>
<footer class="footer">
You can’t perform that action at this time.