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
'use strict'; | |
const functions = require('firebase-functions'); | |
const sgMail = require('@sendgrid/mail'); | |
sgMail.setApiKey("SEND_GRID_API_KEY"); /** replace with your own SendGrid API key */ | |
const cors = require('cors')({ | |
origin: ['ANGULAR_DEVELOPMENT_ENVIRONMENT_URL'], /** replace with the url of your development environment that serves your angular app. */ |
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 } from '@angular/core'; | |
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/retry'; | |
import 'rxjs/add/operator/toPromise'; | |
import { environment } from '../../../environments/environment'; | |
export const CLOUD_FUNCTION_URL = environment.firebase['cloudFunctionUrl']; | |
@Injectable() |
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
sudo apt-get install supervisor | |
cd /etc/supervisor/conf.d | |
#edit file | |
sudo nano /etc/supervisor/conf.d/queue-worker.conf | |
#command | |
[program:queue-worker] | |
process_name=%(program_name)s_%(process_num)02d |
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 php:7.4-fpm-alpine | |
RUN mkdir -p /var/www/html | |
WORKDIR /var/www/html | |
RUN sed -i "s/user = www-data/user = root/g" /usr/local/etc/php-fpm.d/www.conf | |
RUN sed -i "s/group = www-data/group = root/g" /usr/local/etc/php-fpm.d/www.conf | |
RUN echo "php_admin_flag[log_errors] = on" >> /usr/local/etc/php-fpm.d/www.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
public function calculatePayee($salaryAmount, $nssfAmount){ | |
$tax = 0; | |
$remaining = $salaryAmount - $nssfAmount; | |
if($remaining > 24000){ | |
$tax += 24000 * (10/100); | |
$remaining -= 24000; | |
if($remaining > 0){ | |
$amountToTax = ($remaining < 8333) ? $remaining : 8333 ; |