Skip to content

Instantly share code, notes, and snippets.

View duncanhunter's full-sized avatar

Duncan Hunter duncanhunter

View GitHub Profile
@duncanhunter
duncanhunter / product.effects.ts
Created August 15, 2022 22:26
Example load products with cache. Used
import { Injectable } from '@angular/core';
import { mergeMap, map, catchError, concatMap, withLatestFrom, filter, tap } from 'rxjs/operators';
import { of } from 'rxjs';
import { ProductService } from '../product.service';
/* NgRx */
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { ProductPageActions, ProductApiActions } from './actions';
import { Store } from '@ngrx/store';
@duncanhunter
duncanhunter / cloudSettings
Last active August 14, 2017 02:33
Visual Studio Code Sync Settings Gist
{"lastUpload":"2017-08-14T02:32:58.403Z","extensionVersion":"v2.8.2"}
@duncanhunter
duncanhunter / jasmine-vscode-snippets.ts
Last active January 20, 2017 16:39
Jasmine VSCode TypeScript Snippets
// In VSCode:
// 1. type F1 then enter '>Open User Snippets'
// 2. select 'TypeScript'
// 3. paste in below snippets
"jasmine describe": {
"prefix": "jdescribe",
"body": [
"describe(`$1`, () => {",
"$0",
@duncanhunter
duncanhunter / docker elk demo
Created February 12, 2016 08:42
tutum stack for elk
elasticsearch:
image: 'elasticsearch:2.2'
ports:
- '9200:9200'
volumes_from:
- elasticsearch-data
elasticsearch-data:
image: 'alpine:latest'
command: /bin/true
volumes: