Skip to content

Instantly share code, notes, and snippets.

@plamoni
plamoni / changedetectorref-markForCheck.ts
Last active December 30, 2020 13:30 — forked from rakia/changedetectorref-markForCheck.ts
Angular ChangeDetectorRef
import { ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core';
...
constructor(private cd: ChangeDetectorRef) {
this.service.dataList$.pipe(takeUntil(this._unsubscribeAll))
.subscribe((data: Invoice[]) => {
this.dataList = data;
this.cd.markForCheck();
});
class SiriProxy::Plugin::Twitter < SiriProxy::Plugin
# this watches when in the default context
listen_for /tweet (.*)/ do |data, tweetText|
show_rich_snippet do
image 'http://cl.ly/1l040J1A392n0M1n1g35/content' # this just makes things looks nice, but is obviously specific to my username
text tweetText
end
# this locks out other plugins until a confirmation or deny
confirm do