Skip to content

Instantly share code, notes, and snippets.

View third774's full-sized avatar

Kevin Kipp third774

View GitHub Profile
@third774
third774 / generics.ts
Last active October 5, 2017 02:37
Typescript generic problems and fixes
class Animal {
name: string;
}
class Dog extends Animal {
bark() {};
}
class Cat extends Animal {
meow() {};
/*
// file should be in ${workspaceRoot}/loaders/
const path = require('path');
webpackConfig = {
resolveLoader: {
modules: [
'node_modules',
path.resolve(__dirname, 'loaders')
@third774
third774 / .bash_profile
Created August 27, 2017 14:07
Adding this to .bash_profile updates the tab title when the directory changes
# Adding this to .bash_profile updates the tab title when the directory changes
# can also manually name a tab eg: title FOOBAR
function title {
export TITLE_OVERRIDDEN=1
PROMPT_COMMAND=''
echo -ne "\033]0;"$*"\007"
}
case "$TERM" in
@third774
third774 / app.module.ts
Created April 13, 2017 05:30
Implementing global Custom Errors in ng-bootstrap-form-validation
import {BrowserModule} from "@angular/platform-browser";
import {NgModule} from "@angular/core";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {HttpModule} from "@angular/http";
import {NgBootstrapFormValidationModule} from "ng-bootstrap-form-validation";
import {AppComponent} from "./app.component";
import {CUSTOM_ERRORS} from "./custom-errors";
@NgModule({
declarations: [
{
"cookoff" : {
"complete" : true,
"criteria" : [ {
"name" : "Taste"
}, {
"name" : "Aftertaste"
}, {
"name" : "Aroma"
}, {