This file contains hidden or 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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "$ref": "#/definitions/TrackingEvents", | |
| "definitions": { | |
| "TrackingEvents": { | |
| "type": "object", | |
| "additionalProperties": false, | |
| "properties": { | |
| "openLoginModal": { | |
| "$ref": "#/definitions/TrackingParams%3Cstructure-tracking_auth.ts-919-955-tracking_auth.ts-903-956-tracking_auth.ts-839-956-tracking_auth.ts-800-1541-tracking_auth.ts-0-1542%3E", |
This file contains hidden or 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 pg from 'pg'; | |
| const dbHost = process.env.DB_HOST; | |
| const dbPort = process.env.DB_PORT; | |
| const dbUser = process.env.DB_USER; | |
| const dbPassword = process.env.DB_PASSWORD; | |
| const country = process.env.COUNTRY; | |
| const { Client } = pg; |
This file contains hidden or 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 pg from 'pg'; | |
| const { Client } = pg; | |
| const dbUrl = 'postgresql://USERNAME:PASSWORD@127.0.0.1:15432'; | |
| const buynana = new Client(`${dbUrl}/api_buynana_co`); | |
| const coordinators = new Client(`${dbUrl}/api_coordinators_co`); | |
| async function main() { |
This file contains hidden or 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 { Constructor } from '@mikro-orm/core'; | |
| import { EntityManager } from '@mikro-orm/core'; | |
| export async function truncate(em: EntityManager, entities: Constructor[]) { | |
| const meta = em.getMetadata(); | |
| for (const entity of entities) { | |
| const entityMeta = meta.get(entity.name); | |
| if (!entityMeta) { |
This file contains hidden or 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 { useRouter } from 'next/router'; | |
| import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; | |
| import { useEffect, useMemo, useState } from 'react'; | |
| // common defs | |
| export const numParam: ParamDef<number> = { | |
| encode: (value) => value.toString(), | |
| decode: (value) => (typeof value === 'string' && value ? parseInt(value, 10) : undefined), | |
| }; |
This file contains hidden or 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 { useRouter } from 'next/router'; | |
| export const locales = ['it', 'en'] as const; | |
| export type Locale = typeof locales[number]; | |
| export const isLocale = (locale: string): locale is Locale => { | |
| return (locales as unknown as string[]).includes(locale); | |
| }; |
This file contains hidden or 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
| # This script copies the right firebase configuration ( GoogleService-Info.plist file ) for the running flavor. | |
| # It must be run as a Build Phase. It assumes three flavors: "dev", "stage" and "prod". | |
| if [ "${CONFIGURATION}" == "Debug-prod" ] || [ "${CONFIGURATION}" == "Release-prod" ] || [ "${CONFIGURATION}" == "Profile-prod" ]; | |
| then | |
| cp -r "${PROJECT_DIR}/Runner/Firebase/prod/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist" | |
| elif [ "${CONFIGURATION}" == "Debug-stage" ] || [ "${CONFIGURATION}" == "Release-stage" ] || [ "${CONFIGURATION}" == "Profile-stage" ]; | |
| then | |
| cp -r "${PROJECT_DIR}/Runner/Firebase/stage/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist" | |
| elif [ "${CONFIGURATION}" == "Debug-dev" ] || [ "${CONFIGURATION}" == "Release-dev" ] || [ "${CONFIGURATION}" == "Profile-dev" ]; |
This file contains hidden or 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
| SELECT pg_size_pretty( pg_database_size('DB_NAME') ); |
This file contains hidden or 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
| buildscript { | |
| repositories { | |
| google() | |
| jcenter() | |
| } | |
| dependencies { | |
| classpath 'com.android.tools.build:gradle:3.3.1' | |
| classpath 'com.google.gms:google-services:3.2.1' | |
| } |
This file contains hidden or 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
| DC_COMMON = ./config/common/docker-compose.yaml | |
| DC_DEV = ./config/dev/docker-compose.yaml | |
| dev: ${DC_COMMON} ${DC_DEV} | |
| docker-compose -f ${DC_COMMON} -f ${DC_DEV} -p suma up | |
| dev-build: ${DC_COMMON} ${DC_DEV} | |
| docker-compose -f ${DC_COMMON} -f ${DC_DEV} -p suma up --build |
NewerOlder