Skip to content

Instantly share code, notes, and snippets.

🅰️
Working on Angular things!

Johannes Hoppe JohannesHoppe

🅰️
Working on Angular things!
Block or report user

Report or block JohannesHoppe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View custom-route-serializer.ts
import { Params, RouterStateSnapshot, Data } from '@angular/router';
import { RouterStateSerializer, BaseRouterStoreState } from '@ngrx/router-store';
export interface RouterStateWithData<T> extends BaseRouterStoreState {
url: string;
params: Params;
// queryParams: Params;
data: T;
}
View gist:677e4925d98d3cee3c5da104b0c41ae9
📝Blogged: ngx-semantic-version: enhance your git and release workflow for 🅰️ #Angular by our guest author @d_koppenhagen. 🚀
https://angular.schule/blog/2019-11-ngx-semantic-version
Save a lot of time and automatically…
💎 lint messages
⛏ hook into git lifecycle
📦 bump releases
📖 generate CHANGELOG files
View Remove HP Product Research.md

/Library/Printers/hp/Utilities/HPPU Plugins/ProductImprovementStudy.hptask/Contents/Helpers/HP Product Research Manager.app

Just move it to the trash.

@JohannesHoppe
JohannesHoppe / docker_stop_remove_all.md
Created Oct 18, 2019
Stop / remove all Docker containers
View docker_stop_remove_all.md

One liner to stop / remove all of Docker containers:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@JohannesHoppe
JohannesHoppe / swallowError.operator.ts
Created Jun 8, 2019
Quick and dirty reaction to rxjs errors
View swallowError.operator.ts
import { OperatorFunction, EMPTY } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { ErrorDisplayService } from './error-display.service';
export function swallowError<T>(): OperatorFunction<T, T> {
return catchError(() => (EMPTY));
}
export function swallowErrorWithDisplay<T>(eds: ErrorDisplayService): OperatorFunction<T, T> {
return catchError(err => {
View boostrap4-display-utilities.csv
Old New
.hidden .d-none
.hidden-xs-up .d-none
.hidden-xs .d-none .d-sm-[value]
.visible-xs .d-sm-none
.visible-xs-block .d-block .d-sm-none
.visible-xs-inline .d-inline .d-sm-none
.visible-xs-inline-block .d-inline-block .d-sm-none
.hidden-xs-down .d-none .d-sm-[value]
.hidden-sm .d-sm-none .d-md-[value]
@JohannesHoppe
JohannesHoppe / access-mac-localhost-from-parallels-desktop-ie-edge.md
Created Apr 4, 2019
Accessing macOS localhost from Parallels Desktop IE or Edge
View access-mac-localhost-from-parallels-desktop-ie-edge.md

Access macOS localhost from IE or Edge within Parallels Desktop

This issue is so infuriating that I'm going to take some time to write about it.

  1. MOST IMPORTANT. Your local development server must be bound to IP address 0.0.0.0. Some do this by default, but many don't. You need to make sure that you run your local server with correct IP bindings. You may need to provide additional flags to your serve commands e.g. polymer serve --hostname domain.local, hugo serve --bind 0.0.0.0. If you use a named domain like domain.local, it has to be defined in /etc/hosts and pointing at 0.0.0.0.

  2. My Parallels setting is using Shared Network, nothing special there.

  3. Open macOS Terminal and type ifconfig. Look for the value under vnic0 > inet. It is typically 10.211.55.2.

@JohannesHoppe
JohannesHoppe / How to Restart Mac OS X Mission Control and Dock.md
Created Apr 1, 2019
How to Restart Mac OS X Mission Control and Dock
View How to Restart Mac OS X Mission Control and Dock.md

If you are having problems on your Mac with the Dock or the Mission Control feature, you can simply restart both by:

killall Dock
View Compress PDF mac.md

https://apple.stackexchange.com/a/33750

ColorSync Utility is what your looking for. For me the standard compression was also too little resolution & too lossy compression. So I created a new filter in ColorSync - which then becomes available in e.g. Preview: Resolution 200 dpi, jpeg quality ~75%

Step 1: Open ColorSync Utility & create the new filter such as below

![Screenshot: New ColorSync filter][2]

The above settings give me files with acceptable size and decent quality (e.g. for sending by e-mail)

View angular.zsh-theme
#
# Modified Cobalt2 Theme - https://github.com/wesbos/Cobalt2-iterm
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
##
### Segment drawing
# A few utility functions to make it easy and re-usable to draw segmented prompts
You can’t perform that action at this time.