Skip to content

Instantly share code, notes, and snippets.

import { Injectable, OnModuleInit } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { Logger } from 'nestjs-pino';
// eslint-disable-next-line
const KafkaAvro = require('kafka-avro');
@Injectable()
export class KafkaService implements OnModuleInit {
client: any;
{
"branch": "master",
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
}
}],
["@semantic-release/release-notes-generator", {
module.exports = {
types: [
{ value: 'feat', name: '✨ - FEATURE: a new feature' },
{ value: 'fix', name: '🐞 - FIX: a bug fix' },
{
value: 'chore',
name: '🔧 - CHORE: changes to the build process or auxiliary tools and libraries such as documentation generation'
},
{ value: 'docs', name: '📝 - DOCS: documentation only changes' },
{
version: 0.1
test:
phases:
preTest:
commands:
- npm install
- npm install wait-on
- npm install mocha@5.2.0 mochawesome mochawesome-merge mochawesome-report-generator
- 'npm start & npx wait-on http://localhost:3869'
test:
@DanielNetzer
DanielNetzer / firebase.js
Created February 27, 2019 09:17
nuxtjs firebase plugin
import firebase from 'firebase/app'
import 'firebase/firestore'
import 'firebase/auth'
import 'firebase/storage'
export default ({ app }, inject) => {
const env = process.browser ? app.store.state.env : process.env
// init firebase
if (!firebase.apps.length && env.API_KEY && env.PROJECT_ID && env.SENDER_ID) {
const config = {
{
"compileOnSave": false,
"include": [
"src/**/*.ts"
],
"compilerOptions": {
"baseUrl": "./",
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
import { Component, OnInit } from '@angular/core';
import { Validators, FormBuilder } from "@angular/forms";
import { LocationService } from "../location.service";
import { Location } from "../location"
import { ActivatedRoute, ParamMap } from "@angular/router";
import { filter, map, switchMap, take } from "rxjs/operators";
import { Observable } from "rxjs";
export const enum Instruction {
UPDATE
}
instruct(action: Instruction, payload: Partial<S>) {
switch (action) {
case Instruction.UPDATE:
this.update(payload);
break;
default:
import { Injectable } from '@angular/core';
import {
HttpEvent, HttpInterceptor, HttpHandler, HttpRequest,
HttpErrorResponse
} from '@angular/common/http';
import { Observable, throwError, empty, of } from 'rxjs';
import { catchError, retryWhen, flatMap, take, concat, switchMap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import * as fromRoot from '../../store';
import { environmentRule } from '@app/utils/environment';
{ settings:
[Node] { openingMessage:
[Node] { messageType: 'Opening',
[Node] options: [Array],
[Node] message: 'Welcome to CupoTestStore, I\'m Cupo your personal shopkeeper. What type of products are you interested in?' },
[Node] languageCode: 'en',
[Node] platform: 'shopify',
[Node] currency: 'ILS' },
[Node] appearance:
[Node] { colors: { fabBG: '#2196f3', chatTop: '#2196f3', chatControls: '#2196f3' },