This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div [formGroup]="searchTermFormGroup"> | |
<mat-form-field> | |
<input matInput formControlName="searchValueControl"> | |
<mat-error> | |
Search term | |
<strong>required</strong> | |
</mat-error> | |
</mat-form-field> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { enableProdMode } from '@angular/core'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
// Common rxjs operators | |
import 'rxjs/add/operator/takeWhile'; | |
if (environment.production) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test-NetConnection 35.197.254.126 -port 11211 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array = aws s3api list-buckets --query "Buckets[].Name" | Where { $_ -like "*.tb-*" -and $_ -notlike "*.tb-nav*" } | |
"Found $array.Length buckets" | |
$count = 0 | |
for ($i=0; $i -lt $array.Length; $i++) { | |
$count = $i + 1 | |
$bucket = $array[$i] -replace '"' -replace ',' | |
$bucket = $bucket.Trim() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div fxLayout="column"> | |
<div fxLayout="row"> | |
<div fxFlex fxLayout="column"> | |
<!-- GHOST ELEMENT - | |
Similar to Chosen with hidden selects.... | |
We use this as a container becasue the changes don't bind well to a textarea it doesn't fire the correc caret event to track length.. !!!!--> | |
<div style="display:none" class="emoji-content-editable textarea" (emojiPickerCaretEmitter)="handleCurrentCaret($event)" | |
(input)="content = $event.target.textContent" [textContent]="content" contenteditable="true"> | |
</div> | |
<md-input-container *ngIf="type === 'standard'" class="full-width" floatPlaceholder="never"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find the shortest word in an arra of words | |
// Example "Some so WOrds Will Be Longer" would return 2 | |
function findShort(s){ | |
return Math.min.apply(null, s.split(' ').map(w => w.length)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const state = Observable.timer(1000) // every second | |
.map(() => this.loaded) | |
.repeat(8) // retry 8 times | |
.retry(); | |
state.subscribe((res) => { | |
// this is the main body of the retry | |
console.log('Result: ', res) // will out put false 8 times for the loaded value. | |
}, (err) => { }, () => { | |
if (this.loaded === false) { | |
this.errorLoading = true; // If it hasn't loaded in 8 secs it ain't gonna ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g @angular/cli | |
npm install | |
ng build --environment=prod | |
mkdir deploy deploy/`git rev-parse HEAD` commits | |
cp dist/ deploy/`git rev-parse HEAD` -rf | |
git rev-parse HEAD > commits/`git rev-parse HEAD` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Print to console": { | |
"prefix": "log", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
}, | |
"For Loop": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `talkbe_production`.`lists` | |
ADD COLUMN `promoted` TINYINT(1) NULL AFTER `temp`, | |
ADD COLUMN `order` INT(11) NULL AFTER `promoted`; |