shlogg · Early preview
Krzysztof Platis @krisplatis

Welcome to my blog. I'm Javascript Enthusiast • Fascinated with internals of Vue, React and Angular • Focused on the business needs of Clients • Architect @ SAP Spartacus core team. Opinions R my own

Automate GitHub PR Diffs With Simple Browser Script

Ever stuck clicking "Load diff" on GitHub? Run this script in browser's console to reveal all sections: `clickLoadDiff = () => { ... }` Automates clicks, saving time & effort!

Angular SSR Memory Leaks: Unsubscribe RxJs Subscriptions In Services

Memory leaks in SSR (Angular Universal) occur due to unsubscribed RxJs subscriptions in services, not just components. Unsubscribe in services' ngOnDestroy lifecycle method to prevent memory leaks.

Avoiding Global Static Objects In SSR With Injectable Services

Instead of using global static objects, create injectable services to avoid race conditions in SSR server. This fixes bugs like i18next translations being overwritten between concurrent requests.

Installing DisplayLink Drivers For Seamless Multi-Monitor Setup

Download & install DisplayLink drivers from https://www.synaptics.com/products/displaylink-graphics/downloads/macos. Buy adapter or docking station for extended monitor support.

Angular Schematics Executed In Alphabetical Order

Custom Angular update schematics run in alphabetical order by name, declared in migrations.json. Ensure prefix convention for ordering matters when multiple schematics target same version.

How To Track NgZone Tasks In Angular And Fix SSR Hangs

I discovered a not well-known plugin in the Angular repository: zone.js/plugins/task-tracking. I found a bug there, created a Pull Request that fixed it, and became an Angular contributor after it was merged into the main branch!

Angular 2 Switcher: 4 Handy Keyboard Shortcuts For VS Code

Angular 2 Switcher is a must-have VS Code extension with 4 handy keyboard shortcuts for switching between HTML, TS, SPEC and SCSS files of an Angular component/service.

Avoid Typos In Your Code With VSCode Extension

Code Spell Checker in VSCode highlights typos in code, class/method names & comments. Fix quickly or add custom words to dictionary. Avoid typos in public API of libraries.

Manual Lazy Loading With Angular Standalone APIs

With Angular Standalone APIs, manually lazy load components & services using child EnvironmentInjector, simulating NgModule lazy loading. See stackblitz example: https://stackblitz.com/

Sound Notifications For Long-Running Scripts In Background

Sound notifications for long-running scripts can boost productivity and reduce frustration. Use 'say' command on MacOS or equivalent commands on other OSes to get notified when build succeeds or fails.

Navigating Github PR Changes With Commit Range Selection

Quickly navigate Github PR diffs by selecting a commit range: open 'Files changed', click 'Changes from all commits', hold Shift, and select two commits for a diff view.

Angular Dependency Injection Order Matters

Angular Dependency Injection order matters. Providers are flattened into one list, with last provided taking precedence in case of conflicts. Last provider wins.

Clear Site Data In Chrome With Keyboard Shortcuts

Clear Chrome site data quickly: Press F12, Cmd+Shift+P, type "data", hit Enter. Clears localStorage, sessionStorage, cookies & more for current site.