This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazonlinux:2018.03 | |
SHELL ["/bin/bash", "-c"] | |
ENV BUILD_DIR="/tmp/build" | |
ENV INSTALL_DIR="/opt" | |
# Lock To Proper Release | |
RUN sed -i 's/releasever=latest/releaserver=2018.03/' /etc/yum.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
computed, | |
effect, | |
Inject, | |
Injectable, | |
Pipe, | |
PipeTransform, | |
PLATFORM_ID, | |
signal, | |
SkipSelf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ApplicationRef, | |
ComponentRef, | |
destroyPlatform, | |
getPlatform, | |
Provider, | |
Type, | |
ɵsetDocument | |
} from '@angular/core'; | |
import { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ng-container *ngIf="{ | |
status: status$ | async, | |
sheetId: sheetId$ | async, | |
currentUser: currentUser$ | async, | |
isPurchased: isPurchased$ | async, | |
isReviewed: isReviewed$ | async, | |
reviewStatus: reviewStatus$ | async, | |
sidebarIsSticky: sidebarSticky$ | async | |
} as d"> | |
<scroll-to-top [trackBy]="d.sheetId"></scroll-to-top> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const main = () => { | |
const transposer = new MusicXmlTransposeService(); | |
transposer.load(this.xmlPath).then(() => { | |
transposer.transpose('E'); | |
// use transposer.xml variable (In my case, call `osmd.load(transposer.xml);`) | |
}); | |
}; | |
// Thanks to @ice6 @AlbertHart | |
// Inspired from https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/commit/467e0a600d168e59c6376bc9c75f553801c98961#diff-19b11c7ef440f126313c8af1217075c7L122 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function levenshtein(a: string, b: string): number { | |
if (a.length == 0) { | |
return b.length; | |
} | |
if (b.length == 0) { | |
return a.length; | |
} | |
const matrix = new Array<number[]>(b.length + 1); | |
for (let i = 0; i <= b.length; i++) { | |
matrix[i] = new Array<number>(a.length + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by leo6104 (github.com/leo6104) | |
* You can use this nodejs script on angular v5/v4/v2 project. | |
* 1. Place this gist file `ng-update-v6.js` to angular project's root path | |
* 2. use command `node ng-update-v6.js .angular-cli.json` | |
* 3. check angular.json file (created by ng-update-v6.js) | |
**/ | |
const fs = require('fs'); | |
const path = require('path'); |