Skip to content

Instantly share code, notes, and snippets.

@badri
badri / CloudFormationTemplateOpenShift.yaml
Created October 27, 2018 19:58 — forked from mateobur/CloudFormationTemplateOpenShift.yaml
CloudFormation Template OpenShift
AWSTemplateFormatVersion: '2010-09-09'
Metadata: {}
Parameters:
###########
KeyName:
Description: The EC2 Key Pair to allow SSH access to the instance
Type: 'AWS::EC2::KeyPair::KeyName'
AvailabilityZone:
Description: Availability zone to deploy
@badri
badri / ubuntu-lemp.yaml
Last active August 6, 2018 04:30
OpenShift LEMP template construction
apiVersion: v1
kind: Template
metadata:
name: ubuntu-lemp
objects:
- apiVersion: v1
kind: BuildConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
/**
* GET /api/file/:id
* Download an uploaded file.
*/
export let download = (req: Request, res: Response, next: NextFunction) => {
File.findByIdAndRemove(req.params.id).exec((err, file) => {
if (err) res.status(500).send(err);
if (!file) {
res.status(404).send('not found');
return;
@badri
badri / op.txt
Created May 17, 2018 06:50
Better results
--- Failed scenarios:
features/archive/sessions.feature:80
features/discussions/privacy.feature:25
features/miscellaneous/site_settings.feature:7
125 scenarios (117 passed, 3 failed, 5 undefined)
1255 steps (1218 passed, 3 failed, 6 undefined, 28 skipped)
13m55.29s (69.77Mb)
@badri
badri / op.txt
Created May 17, 2018 05:25
Behat output
--- Failed scenarios:
features/archive/sessions.feature:80
features/discussions/privacy.feature:25
125 scenarios (100 passed, 2 failed, 23 undefined)
1255 steps (1096 passed, 2 failed, 59 undefined, 98 skipped)
15m6.36s (70.64Mb)
--- FeatureContext has missing steps. Define them with these snippets:
@badri
badri / docker-entrypoint.sh
Created April 11, 2018 14:15
MongoDB docker image init script with user provided credentials
#!/bin/bash
set -Eeuo pipefail
if [ "${1:0:1}" = '-' ]; then
set -- mongod "$@"
fi
originalArgOne="$1"
# allow the container to be started with `--user`
FROM lakshminp/node-platform:1.0
FROM postgres:lastest
FROM lakshminp/python-platform:1.0
FROM lakshminp/php-platform:1.9