Sidebar:
- Cmd-Shift-F: search
- Cmd-Shift-E: files
Navigating in current editor:
| /** | |
| * @author Muhammad FAISAL | |
| * @description Controls the display of html contents only during development mode. | |
| * @example <button development-only>Some Button</button> | |
| */ | |
| // Angular Imports | |
| import { Directive, OnInit, ElementRef, isDevMode } from '@angular/core'; | |
| // Define class for the Directive |
| ngOnInit() { | |
| this.filteredRoutes$ = from(this.routes).pipe( | |
| concatMap((route) => { | |
| // handle if nothing is in canActivate | |
| if (!route.canActivate || !route.canActivate.length) { | |
| // create an object that has the route and result for filtering | |
| return of({ route, result: true }); | |
| } | |
| return from(route.canActivate).pipe( |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| public muteFirst = <T,R>(first$: Observable<T>, second$: Observable<R>) => Observable.combineLatest( | |
| first$, | |
| second$, | |
| (a,b) => b | |
| ).distinctUntilChanged(); |
| /** | |
| * Customized HTML5 local storage class with additional functionality. | |
| */ | |
| export class LocalStorage { | |
| /** | |
| * Checks if the browser supports local storage. | |
| * @returns true if the local storage is supported; false otherwise. | |
| */ | |
| public static isSupported(): boolean { | |
| try { |
| #!/bin/bash | |
| # a simple bash script for weight logging automation | |
| # more info: https://skyboo.net/2017/03/automate-my-weekly-weight-logging/ | |
| if [[ $# -eq 0 ]]; then | |
| echo "[*] ERROR: missing weight argument" | |
| exit | |
| fi | |
| echo "[*] **** MyFitnessPal ****" |
| <script type="text/javascript"> | |
| var gesturesSetUp = false; | |
| var ua = navigator.userAgent.toLowerCase(); | |
| var isAndroid = ua.indexOf("android") > -1; | |
| document.addEventListener('textlayerrendered', function (e) { | |
| if (gesturesSetUp || e.detail.pageNumber !== PDFViewerApplication.page) { | |
| return; | |
| } |