Skip to content

Instantly share code, notes, and snippets.

@timjonesdev
timjonesdev / my-lib-bad.module.ts
Last active June 27, 2019 20:24
The incorrect way to import modules for an Angular Library
import {NgModule} from '@angular/core';
import {MyLibComponent} from './my-lib.component';
import {NavigationModule} from "./navigation"; // <-- too short for library module
import {FormModule} from "./form"; // <-- too short for library module
@NgModule({
declarations: [MyLibComponent],
imports: [NavigationModule, FormModule],
exports: [NavigationModule, FormModule]
})
Date: 2019-06-26T17:07:41.247Z
Hash: c58e049a483cf92093f5
Time: 18085ms
chunk {0} runtime-es5.741402d1d47331ce975c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es5.4af9b61479361f268d39.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es5.0abd2975e5ae858be8b6.js (polyfills) 68.1 kB [initial] [rendered]
chunk {3} styles.ff23229eb61c8a3d0e74.css (styles) 62.4 kB [initial] [rendered]
ERROR in : Unexpected value 'undefined' imported by the module 'MyModule in /build/src/node_modules/my-lib/my-lib.d.ts'
@timjonesdev
timjonesdev / teams_initial.bson
Last active May 28, 2019 23:32
Some initial sample data for the reactive mongo streams example.
[
{
"_id": ObjectId("5cb96b9132ac9751f3ff1912"),
"nickname": "HingleMcCringleberry",
"owner": "John S."
},
{
"_id": ObjectId("5cb96b9132ac9751f3ff1892"),
"name": "Johnny Utah",
"owner": "Paul M."
@timjonesdev
timjonesdev / ChangeStream.java
Created May 21, 2019 20:28
An example of how to configure a reactive changestream watcher with Spring Boot 2 and Reactive MongoDB
// uses Spring Boot 2, Spring Webflux, Reactive Mongo Repository
public class ChangeStream {
@Autowired
private ReactiveMongoTemplate reactiveMongoTemplate;
public Flux<SampleDao> watchChanges() {
// set changestream options to watch for any changes to the sample collection
ChangeStreamOptions options = ChangeStreamOptions.builder()
.filter(Aggregation.newAggregation(SampleDao.class,
version: '3.0'
services:
app:
container_name: my_go_app_container
build:
# context can/may/will be different per-project setup
context: ../
dockerfile: GitDockerfile
args:
- bitbucket_id=private_user
# ---------------------------------------------------------------------
# The first stage container, for building the application
# ---------------------------------------------------------------------
FROM golang:1.12.1-stretch as builder
COPY . /app
# Add the keys
ARG bitbucket_id
ENV bitbucket_id=$bitbucket_id
git config \
--global \
url."git@github.com".insteadOf \
"https://github.com"
git config \
--global \
url."https://${user}:${personal_access_token}@github.com".insteadOf \
"https://github.com"
git config \
--global \
url."https://oauth2:${personal_access_token}@privategitlab.com".insteadOf \
"https://privategitlab.com"
#or
git config \
--global \
url."https://${user}:${personal_access_token}@privategitlab.com".insteadOf \
git config \
--global \
url."https://${bitbucket_id}:${bitbucket_token}@privatebitbucket.com".insteadOf \
"https://privatebitbucket.com"