Skip to content

Instantly share code, notes, and snippets.

View timdeschryver's full-sized avatar
👟

Tim Deschryver timdeschryver

👟
View GitHub Profile
{
"extends": "../../.eslintrc.json",
"overrides": [
{
"files": [
"*.ts"
],
"rules": {
"no-restricted-imports": [
"error",
@timdeschryver
timdeschryver / profile.ps1
Created July 1, 2022 17:23
Random Oh My Posh Theme
$Themes = "C:\Users\{user}\AppData\Local\Programs\oh-my-posh\themes\"
$RandomTheme = Get-ChildItem $Themes -name | Select-Object -index $(Random $((Get-ChildItem $Themes).Count))
oh-my-posh init pwsh --config "$Themes\$RandomTheme" | Invoke-Expression
@timdeschryver
timdeschryver / repro.ts
Created June 24, 2022 07:40
reproduction
fit('Then follow through navigation reproduction', async () => {
let isAuthenticated$ = new ReplaySubject<boolean>(1);
let mockedAuthStore = jasmine.createSpyObj<AuthStore>(AuthStore.name, [], {
isAuthenticated$
});
const router = await minimalRender(
[
{ path: '', component: DummyHomeComponent },
...routes
@timdeschryver
timdeschryver / echo.test.ts
Last active June 10, 2021 06:01
RxJS Echo Operator - re-emits (echoes) the last emitted value
import { NEVER, of } from 'rxjs';
import { filter, switchMap } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { echo, echoGroup } from './echo';
const testScheduler = () =>
new TestScheduler((actual, expected) => {
expect(actual).toEqual(expected);
});
@timdeschryver
timdeschryver / angular-forms-guide.css
Last active March 17, 2021 10:12
angular-forms-guide.css
This file has been truncated, but you can view the full file.
/*! tailwindcss v2.0.3 | MIT License | https://tailwindcss.com */
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
/*
Document
========
*/
/**
@timdeschryver
timdeschryver / README.md
Last active December 19, 2020 20:22
ngrx-immer-migrate

ngrx-immer-migrate

Migrates the ngrx-etc immer functionallity to ngrx-immer. Do not forget to uninstall ngrx-etc and install ngrx-immer and immer3

import {
EventObject,
StateMachine,
InterpreterOptions,
MachineOptions,
StateConfig,
interpret,
Actor,
} from 'xstate'
import { from, BehaviorSubject, Observable, merge } from 'rxjs'
import { Component, OnInit, ViewChild } from '@angular/core'
import { MapInfoWindow, MapMarker, GoogleMap } from '@angular/google-maps'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent implements OnInit {
@ViewChild(GoogleMap, { static: false }) map: GoogleMap
<google-map
height="500px"
width="100%"
[zoom]="zoom"
[center]="center"
[options]="options"
(mapClick)="click($event)"
>
<map-marker
#markerElem
export class AppComponent implements OnInit {
@ViewChild(MapInfoWindow, { static: false }) infoWindow: MapInfoWindow
infoContent = ''
openInfo(marker: MapMarker, content) {
this.infoContent = content
this.infoWindow.open(marker)
}
}