Skip to content

Instantly share code, notes, and snippets.

View armorpreston's full-sized avatar
🐢
@ armor

Preston Mitcham armorpreston

🐢
@ armor
  • Armor Defense, Inc.
View GitHub Profile
@armorpreston
armorpreston / component.ts
Last active March 11, 2021 16:44
Badge Popovers
// ...
public badgeOptions: IBadge[] = [
new Badge('Corgi', 'badge-primary', 'God save the queen and her dogs', null, {name: 'Stumpy'}),
new Badge('Shiba Inu', 'badge-default', 'Dogs raised on sushi still don\'t use chopsticks', null, {name: 'Doge'}),
new Badge('Pug', 'badge-danger', 'Your scientists were so preoccupied with whether or not they could...', null, {name: 'Snorelax'}),
new Badge('King Charles Spaniel', 'badge-success', '"Derp derp derp" is what the toy cavalier says', null, {name: 'Chuck'}),
new Badge('Great Dane', 'badge-info', 'Hip replacement surgery insurance recommended', null, {name: 'Scooby'}),
new Badge('French Bulldog', 'badge-warning', 'A wine, a kiss, and a bulldog walk into a bar...', null, {name: 'Napoleon'})
];
@armorpreston
armorpreston / modal.html
Last active February 22, 2021 22:38
Simple Modal
<button class="btn my-4"
[modalId]="'simple-modal'"
[modalTrigger]="simpleExample"
(activated$)="activeModal = $event"
(completed$)="onComplete($event)">
<!-- [modalId], (activated$), and (completed$) are optional -->
show modal
</button>
<ng-template #simpleExample let-reject="dismiss" let-resolve=close>
@armorpreston
armorpreston / date-example.html
Last active May 6, 2020 14:34
Disabling Dates
<date-picker [markDisabled]="markDateDisabled.bind(this)"></date-picker>
@armorpreston
armorpreston / breadcrumb.html
Last active September 8, 2020 18:17
Brandkit / Components / Breadcrumbs
<breadcrumb #breadcrumb></breadcrumb>
@armorpreston
armorpreston / readme.md
Created March 25, 2020 17:38
Validate Script

Before

  • Full story JS is loading from www.fullstory.com

After

  • Full story JS is loading from edge.fullstory.com
  • still POSTing page & bundle
@armorpreston
armorpreston / readme.md
Last active March 25, 2020 15:19
Disable breadcrumbs dropdown

To disable the dropdown options. you can set [hasQuickNav]="false"

Example: Incident Detail

Before

@armorpreston
armorpreston / example.component.ts
Last active March 16, 2020 14:41
Brandkit/Components/read-more
import { Component } from '@angular/core';
@Component({
templateUrl: './example.html'
})
export class ReadMoreExampleComponent {
public content = `<b>Lorem ipsum dolor sit amet</b>, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
<a href="#">consectetur adipiscing elit</a> irure dolor in reprehenderit in voluptate velit esse cillum dolore
@armorpreston
armorpreston / wikipediaHttpTypeAhead.html
Last active January 21, 2020 21:53
Wikipedia Http Type Ahead
<http-type-ahead [service]="wikipediaService"></http-type-ahead>
@armorpreston
armorpreston / accountHttpTypeAhead.html
Last active January 21, 2020 21:54
account http-type-ahead
<div class="card">
<div class="card-body">
<http-type-ahead [service]="accountSearchSelectService"></http-type-ahead>
<ul class="list-group list-group-compact">
<li *ngFor="let account of accountSearchSelectService.selected" class="list-group-item flex justify-content-between">
<div>{{ account?.name }}</div>
<div (click)="accountSearchSelectService.remove(account)" class="cursor-pointer"><i class="ico ico-delete"></i></div>
</li>
</ul>
@armorpreston
armorpreston / stat-list-inline.html
Created November 26, 2019 21:00
Stat List Inline
<ul class="stat-list-inline">
<li><badge>4</badge> <label>CPU</label></li>
<li><badge>4</badge><label>GB MEM</label></li>
<li><badge>30</badge><label>GB HDD</label></li>
</ul>