Update your settings.json with the code below, then restart vscode:
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
import { EntityAdapter, EntityState } from '@ngrx/entity'; | |
import { ActionReducer } from '@ngrx/store'; | |
import { CommandReducer, ReducerCommand } from 'ngrx-command-reducer'; | |
import { BaseAction, StaticAction } from './base.actions'; | |
type PayloadActionFunction<S, P> = (p: P, s: S) => S; | |
type PayloadlessActionFunction<S> = (s: S) => S; | |
export type EntityFunction<S, P> = PayloadActionFunction<S, P> | PayloadlessActionFunction<S>; | |
export class EntityCommandReducer<Entity, State extends EntityState<Entity>, Action extends BaseAction> { |
@Injectable() | |
export class NgrxStoreService { | |
ondestroy$: Observable<void> = new Subject<void>(); | |
constructor(protected store: Store<State>, protected changeDetector: ChangeDetectorRef) { } | |
select<R>(mapFunc: (state: State) => R): Observable<R> { | |
return this.store.select(mapFunc).pipe( | |
takeUntil(this.ondestroy$), |
// SocketIO cheat sheet | |
// SocketIO is a library that makes websockets communications easier. | |
// Page: http://socket.io/ | |
// ref: http://stackoverflow.com/a/10099325 | |
// send to current request socket client | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.sockets.emit('message', "this is a test"); |
#!/bin/bash | |
# Error handling | |
function OwnError() | |
{ | |
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)" | |
exit $2 | |
} | |
# Repository for rethinkdb |
import {Component, EventEmitter, Type} from '@angular/core'; | |
type MetadataName = 'Input' | 'Output'; | |
interface PropDecoratorFactory { | |
ngMetadataName: MetadataName; | |
bindingPropertyName: string | undefined; | |
} | |
interface PropMetadata { [key: string]: PropDecoratorFactory[]; } |
/*************************** | |
NOT MAINTAINED! from ~2014 | |
****************************/ | |
// cs4+ script for resizing objects proportionally to fit inside artboard | |
// based on: https://forums.adobe.com/message/4164590 | |
// usage: create a new document with desired artboard size, paste object, select it, run this script | |
// bugs: centering does not work after changing artboard size | |
var activeDoc = app.activeDocument |
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |