docker-compose -f docker-compose.apache.yml up
docker-compose -f docker-compose.nginx+apache.yml up
docker-compose -f docker-compose.nginx+php-fpm.yml up
<?php | |
// All file paths relative to root | |
chdir(dirname(__DIR__)); | |
require "vendor/autoload.php"; | |
$settings = ['foo' => 'FOO', 'bar' => 'BAR']; | |
$app = new \Slim\App($settings); | |
// Set some things into the container |
docker-compose -f docker-compose.apache.yml up
docker-compose -f docker-compose.nginx+apache.yml up
docker-compose -f docker-compose.nginx+php-fpm.yml up
FROM php:7-fpm | |
RUN apt-get update && apt-get install -y git libcurl4-gnutls-dev zlib1g-dev libicu-dev g++ libxml2-dev libpq-dev \ | |
&& git clone -b php7 https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis \ | |
&& docker-php-ext-install pdo pdo_mysql pdo_pgsql pgsql intl curl json opcache xml redis \ | |
&& apt-get autoremove && apt-get autoclean \ | |
&& rm -rf /var/lib/apt/lists/* |
import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
const IV_LENGTH: number = 16; // For AES, this is always 16 | |
/** | |
* Will generate valid encryption keys for use | |
* Not used in the code below, but generate one and store it in ENV for your own purposes | |
*/ | |
export function keyGen() { |
version: '3' | |
services: | |
web: | |
image: 'gitlab/gitlab-ce:latest' | |
restart: always | |
hostname: 'gitlab.example.com' | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'https://gitlab.example.com' | |
nginx['listen_port'] = 80 |
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
This is the example code from my video about using async/await with Cloud Functions. I've placed it here in a gist so it's easier to compare the "before" and "after" states for each case.
The code in this project is licensed under the Apache License 2.0.
Copyright 2018 Google LLC