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!
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
Ever stuck clicking "Load diff" on GitHub? Run this script in browser's console to reveal all sections: `clickLoadDiff = () => { ... }` Automates clicks, saving time & effort!
Boost code review efficiency with custom VSCode shortcuts: switch between diff & source, navigate changes, mark files as viewed & more!
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.
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.
Download & install DisplayLink drivers from https://www.synaptics.com/products/displaylink-graphics/downloads/macos. Buy adapter or docking station for extended monitor support.
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.
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 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.
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.
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 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.
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. Providers are flattened into one list, with last provided taking precedence in case of conflicts. Last provider wins.
ng update @my/lib@version runs specified library version & launches schematics in migration.json with version between installed & target versions.
Clear Chrome site data quickly: Press F12, Cmd+Shift+P, type "data", hit Enter. Clears localStorage, sessionStorage, cookies & more for current site.