Skip to content

Instantly share code, notes, and snippets.

View TylerJPresley's full-sized avatar

Tyler J Presley TylerJPresley

View GitHub Profile
@TylerJPresley
TylerJPresley / custom-validation-view-strategy.js
Last active September 6, 2018 19:10
My custom approach to Aurelia's validation view strategy. It's closely based on the twbootstrap-view-strategy.js from within aurelia/validation.
import {ValidationViewStrategy} from 'aurelia-validation/validation-view-strategy';
export class CustomValidationViewStrategyBase extends ValidationViewStrategy {
constructor(containerClass, containerSuccessClass, containerErrorClass, appendClass, appendActiveClass) {
super();
this.containerClass = containerClass; // The class for the container.
this.containerErrorClass = containerErrorClass; // What's the error class for the container
this.containerSuccessClass = containerSuccessClass; // What's the error class for the container
this.appendClass = appendClass; // Where we're appending the message
@TylerJPresley
TylerJPresley / bootstrap-v4_package.json
Last active December 20, 2015 02:35
This version will expose the SCSS when using JSPM.
{
"name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "4.0.0-alpha.2",
"keywords": [
"css",
"sass",
"mobile-first",
"responsive",
"front-end",
@TylerJPresley
TylerJPresley / deploy.sh
Last active January 2, 2016 01:46
Bash script to deploy static/js website
#!/bin/bash
YELLOW='\033[0;33m'
YELLOW_BOLD='\033[1;33m'
BLUE='\033[0;34m'
BLUE_BOLD='\033[1;34m'
NC='\033[0m' # No Color
USER="thatuser"
IP="999.999.999.999"
@TylerJPresley
TylerJPresley / http-utility.js
Last active September 6, 2018 19:11
Aurelia http structure
import {Cookie} from 'cookie';
export class HttpUtility {
constructor() {
}
standardConfiguration(config) {
config
@TylerJPresley
TylerJPresley / StrengthenIconExport.jsx
Last active January 6, 2016 22:05
This Photoshop script helps me generate ~100 icons that get used in various places. All the layers in the PSD are smart objects that can be easily resized without getting distorted.
#target photoshop
//
// StrengthenIconExport.jsx
//
//
// Generated Sat Jan 02 2016 14:20:45 GMT-0600
//
cTID = function(s) { return app.charIDToTypeID(s); };
@TylerJPresley
TylerJPresley / config.js
Last active January 3, 2016 04:22
config.js overrides
"overrides": {
"npm:[email protected]": {
"main": "client/shim.min"
},
"github:hakanersu/[email protected]": {
"main": "dist/js/jquery.amaran.min.js"
},
"github:TylerJPresley/bootstrap@v4-dev": {
"dependencies": {
"HubSpot/tether": "1.1.1",
@TylerJPresley
TylerJPresley / countries.json
Created January 25, 2016 04:54
Countries / Abbreviations / Administrative Divisions
{"countries":[{"name":"Afghanistan","abbr":"AF","divisions":["Badakhshan","Badghis","Baghlan","Balkh","Bamyan","Daykundi","Farah","Faryab","Ghazni","Ghor","Helmand","Herat","Jowzjan","Kabul","Kandahar","Kapisa","Khost","Kunar","Kunduz","Laghman","Logar","Maidan Wardak","Nangarhar","Nimruz","Nuristan","Paktia","Paktika","Panjshir","Parwan","Samangan","Sar-e Pol","Takhar","Urozgan","Zabul"]},{"name":"Åland Islands","abbr":"AX","divisions":["Brändö","Eckerö","Finström","Föglö","Geta","Hammarland","Jomala","Kumlinge","Kökar","Lemland","Lumparland","Mariehamn","Saltvik","Sottunga","Sund","Vårdö"]},{"name":"Albania","abbr":"AL","divisions":["Berat","Dibër","Durrës","Elbasan","Fier","Gjirokastër","Korçë","Kukës","Lezhë","Shkodër","Tirana","Vlorë"]},{"name":"Algeria","abbr":"DZ","divisions":["Adrar","Aïn Defla","Aïn Témouchent","Algiers","Annaba","Batna","Béchar","Béjaïa","Biskra","Blida","Bordj Bou Arréridj","Bouïra","Boumerdès","Chlef","Constantine","Djelfa","El Bayadh","El Oued","El Tarf","Ghardaïa","Guelma","Illi
@TylerJPresley
TylerJPresley / date-picker.html
Last active February 6, 2016 18:12
Aurelia date picker
<template>
<adaptive-input input-class="form-control date" type="text" label="Date" value.bind="value"></adaptive-input>
</template>
@TylerJPresley
TylerJPresley / welcome.html
Last active March 16, 2016 16:59
Aurelia cascading selects example
<template>
<section class="au-animate">
<h2>Cascading Selects Example</h2>
<form role="form" submit.delegate="submit()">
<div class="form-group">
<label for="levelOne">Level 1</label>
<select id="levelOne" name="levelOne" value.bind="levelOne">
@TylerJPresley
TylerJPresley / app.html
Last active April 24, 2016 04:54
Aurelia simple repeat
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from='./items-list'></require>
<items-list close.call="close($event)"></items-list>
</template>