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 { StyleSheet, TouchableOpacity } from 'react-native'; | |
import { Text, View } from '../components/Themed'; | |
import { RootStackScreenProps } from '../types'; | |
import WebView from "react-native-webview"; | |
export default function NotFoundScreen({ navigation, route }: RootStackScreenProps<'NotFound'>) { | |
if (route.path) { | |
return ( |
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 {ActivityIndicator, Linking, Platform, ScrollView, Share, StyleSheet, TouchableOpacity} from 'react-native'; | |
import WebView, {WebViewNavigation} from "react-native-webview"; | |
import { View, Text } from '../components/Themed'; | |
import Layout from "../constants/Layout"; | |
import Colors from "../constants/Colors"; | |
import React, {useEffect, useMemo, useRef, useState} from "react"; | |
import {NativeStackScreenProps} from "@react-navigation/native-stack"; | |
import {RootStackParamList} from "../types"; | |
import {BlogArticle, getBlogArticle} from "../services/news"; |
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 airtable from 'airtable'; | |
import { AirtableConfig } from '../airtableConfig'; | |
import CacheService from './CacheService'; | |
export default class AirtableService { | |
private config: AirtableConfig; | |
private table: Airtable.Table<any>; | |
private cache: CacheService; |
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
export interface AirtableConfig { | |
route: string; | |
base: string; | |
table: string; | |
view?: string; | |
filter?: string; | |
fields: string[]; | |
fieldMappings?: Function; | |
} |
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
const CACHE_TTL = 1000 * 60; // 1 minute | |
export default class CacheService { | |
private memoryCache: string | undefined; | |
private cacheExpiredAt: number = Date.now(); | |
public get(): any { | |
if (!this.memoryCache) { | |
throw new Error("Memory cache is empty"); |
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
ARG PHP_EXTENSIONS="apcu bcmath opcache pcntl pdo_mysql redis zip sockets imagick gd exif" | |
FROM hyperair/php:7.3-v2-slim-apache | |
ENV TEMPLATE_PHP_INI=production \ | |
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=false \ | |
APP_ENV=prod \ | |
APACHE_DOCUMENT_ROOT=/public | |
# For some reasons I can't get optipng pngquant to compile on Arm64 | |
# USER root | |
# RUN rm -rf /var/lib/apt/lists/* && \ |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"autoscaling:DescribeAutoScalingGroups", | |
"autoscaling:DescribeLaunchConfigurations", | |
"autoscaling:DescribeTags", | |
"ec2:DescribeInstances", |
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
variables: | |
DOCKER_DRIVER: "overlay2" | |
REPOSITORY_URL: "changeme:latest" | |
stages: | |
- build | |
- deploy | |
services: | |
- docker:dind |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: backend-config | |
data: | |
APP_DEBUG: "false" | |
APP_ENV: production | |
APP_KEY: changeme | |
APP_LOG_LEVEL: debug | |
APP_NAME: "Laravel K8s" |