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
| model() { | |
| let userPromise = this.store.findAll(‘user’); | |
| userPromise.catch((error) => { | |
| // transition to another route and show some error notification saying your team is doing their best to fix the problem | |
| }); | |
| return userPromise; | |
| } |
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
| CREATE OR REPLACE FUNCTION notify_trigger() RETURNS trigger AS $$ | |
| DECLARE | |
| channel_name varchar DEFAULT (TG_TABLE_NAME || '_changes'); | |
| BEGIN | |
| IF TG_OP = 'INSERT' THEN | |
| PERFORM pg_notify(channel_name, '{"id": "' || NEW.id || '"}'); | |
| RETURN NEW; | |
| END IF; | |
| IF TG_OP = 'DELETE' THEN | |
| PERFORM pg_notify(channel_name, '{"id": "' || OLD.id || '"}'); |
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
| # NOT FOR SHELL SCRIPT, but rather just for quick copy paste | |
| # this is a copy-paste version with defaults of the full shell script docker-xenial.sh which is below this one in gist. | |
| apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \ | |
| mkdir -p /etc/apt/sources.list.d && \ | |
| echo deb https://apt.dockerproject.org/repo ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \ | |
| service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \ | |
| apt-get update -q && apt-get upgrade -y -q && \ | |
| apt-get install -y -q docker-engine && \ | |
| mkdir -p /etc/systemd/system/docker.service.d && \ |
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
| function getURLParameter(name) { | |
| var val = (RegExp('[?|&]' + name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]; | |
| return val ? decodeURI(val) : val; | |
| } |
OlderNewer