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 node:12.22-alpine3.15 AS build | |
WORKDIR /app/acvali-backoffice | |
RUN npm cache clean --force | |
COPY . . | |
RUN npm install --legacy-peer-deps | |
RUN npm run build:prod -- --base-href /backoffice/ |
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
ARG APP_NAME=aplication-name | |
FROM maven:3.6.1-jdk-8-alpine as build-env | |
COPY pom.xml /tmp/ | |
COPY src /tmp/src/ | |
WORKDIR /tmp/ | |
RUN mvn package |
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
read -p "Enter the log filter: " filter | |
echo "" | |
echo "[Logging to '$filter']" | |
echo "" | |
adb logcat | grep $filter |
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
if [ -z "$ANDROID_SDK_ROOT" ]; then | |
echo "ANDROID_SDK_ROOT is not set" | |
exit 1 | |
fi | |
cd $ANDROID_SDK_ROOT/emulator | |
echo "" | |
echo "[Available devices]" | |
./emulator -list-avds |
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 {NgModule, Pipe, PipeTransform} from '@angular/core'; | |
@Pipe({ | |
name: 'trackByKey', | |
pure: true, | |
}) | |
export class TrackByKeyPipe implements PipeTransform { | |
public transform(key: string) { | |
return (index, value) => { | |
return value[key]; |
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 { ErrorHandler, Inject, Injectable, InjectionToken } from '@angular/core'; | |
import { | |
HTTP_INTERCEPTORS, | |
HttpErrorResponse, | |
HttpEvent, | |
HttpHandler, | |
HttpInterceptor, | |
HttpRequest | |
} from '@angular/common/http'; | |
import { Observable, throwError } from 'rxjs'; |
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
/** | |
* Used to guarantee an error-free conversion of a string to JSON object. | |
* @param str: string | |
* @return any | |
*/ | |
export function safeJSONParse(str: string): any { | |
try { | |
return JSON.parse(str); | |
} catch (_) { | |
return null; |
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 { Injectable, OnDestroy } from '@angular/core'; | |
import { NavigationEnd, Router } from '@angular/router'; | |
import { Subscription } from 'rxjs'; | |
import { environment } from '@env/environment'; | |
declare let fbq: Function; | |
@Injectable({ | |
providedIn: 'root' |