Skip to content

Instantly share code, notes, and snippets.

View freshcutdevelopment's full-sized avatar

Sean Hunter freshcutdevelopment

View GitHub Profile
@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;
@freshcutdevelopment
freshcutdevelopment / app.html
Last active October 30, 2017 05:35
Aurelia in Action - Binding overview
<template>
<h1>${greeting}</h1>
<form class="form-inline">
<input class="form-control" placeholder="greeting..." value.bind="greeting"></input>
</form>
</template>
@freshcutdevelopment
freshcutdevelopment / app.html
Created October 30, 2017 05:27
Aurelia Gist - RequireJS, Bootstrap, Fontawesome
<template>
<h1>${message}</h1>
</template>
@freshcutdevelopment
freshcutdevelopment / aurelia.json
Last active October 29, 2017 18:17
AIA Chapter 2 - package.json & aurelia.json dependencies
{
"name": "my-books",
"type": "project:application",
"platform": {
"id": "web",
"displayName": "Web",
"output": "scripts",
"index": "index.html"
},
"transpiler": {
@freshcutdevelopment
freshcutdevelopment / app.html
Last active March 3, 2018 19:51
Adding Bootstrap 4 to an Aurelia CLI Project
<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">
@freshcutdevelopment
freshcutdevelopment / index.html
Last active October 8, 2017 03:26
Box color CSS transition
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Transition Example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="box"></div>
</body>
@freshcutdevelopment
freshcutdevelopment / install-selectize.sh
Created October 1, 2017 03:18
Install jquery, selectize, and flag-icon-css
npm install jquery --save
npm install selectize --save
npm install flag-icon-css --save
@freshcutdevelopment
freshcutdevelopment / getHtml.js
Created October 1, 2017 03:05
Ux selectize component, get HTML
loadSelectItemView(templateUrl) {
return this.viewEngine.loadViewFactory(templateUrl);
}
getHtml(item, factory) {
const childContainer = this.container.createChild();
const view = factory.create(childContainer);
view.bind(item);
@freshcutdevelopment
freshcutdevelopment / ux-selectize-inline-render.js
Created October 1, 2017 02:47
UX selectize inline render
render: {
option: (item, escape) => {
return `<template>
<span class="title">
<span class="name">
<span class="flag-icon flag-icon-${code.toLowerCase()} flag-icon-squared">
</span>
</span>
</span>
<span class="description">${code} - ${name} </span>
<template>
<span class="title">
<span class="name">
<span class="flag-icon flag-icon-${code.toLowerCase()} flag-icon-squared">
</span>
</span>
</span>
<span class="description">${code} - ${name} </span>
</template>