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
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; | |
} |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
// https://github.com/deebloo/rxjs-worker | |
var observable = Observable.of([0, 1, 2, 3, 4]); | |
observable | |
.map(function (data) { | |
return data.concat([5, 6, 7, 8, 9]); | |
}) | |
.workerMap(function (data) { | |
return data.concat([10,11,12,13,14]);; | |
}) |
export function levenshtein(a: string, b: string): number | |
{ | |
const an = a ? a.length : 0; | |
const bn = b ? b.length : 0; | |
if (an === 0) | |
{ | |
return bn; | |
} | |
if (bn === 0) | |
{ |